Skip to main content

slack_web_api/api/
team.rs

1// このファイルは codegen/generate.py が生成する。手で編集しない
2
3#![allow(unused_imports)]
4
5use crate::objects::*;
6use crate::{
7    CursorPaginated, NextCursor, ResponseMetadata, SlackApiMethod, SlackClient, SlackError,
8};
9use serde::{Deserialize, Serialize};
10
11/// Arguments for the Slack Web API method [`team.accessLogs`](https://docs.slack.dev/reference/methods/team.accessLogs): Gets the access logs for the current team.
12///
13/// Send it with [`SlackClient::team_access_logs`].
14#[doc(alias = "team.accessLogs")]
15#[derive(Debug, Clone, PartialEq, Serialize, Default)]
16#[non_exhaustive]
17pub struct TeamAccessLogsRequest {
18    /// End of time range of logs to include in results (inclusive).
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub before: Option<String>,
21    #[serde(skip_serializing_if = "Option::is_none")]
22    pub count: Option<String>,
23    #[serde(skip_serializing_if = "Option::is_none")]
24    pub page: Option<String>,
25    /// Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See [pagination](https://docs.slack.dev/apis/web-api/pagination.md) for more details.
26    #[serde(skip_serializing_if = "Option::is_none")]
27    pub cursor: Option<String>,
28    /// The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. If specified, result is returned using a cursor-based approach instead of a classic one.
29    #[serde(skip_serializing_if = "Option::is_none")]
30    pub limit: Option<i64>,
31    /// encoded team id to get logs from, required if org token is used
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub team_id: Option<String>,
34}
35
36impl TeamAccessLogsRequest {
37    pub fn new() -> Self {
38        Self {
39            before: None,
40            count: None,
41            page: None,
42            cursor: None,
43            limit: None,
44            team_id: None,
45        }
46    }
47
48    pub fn before(mut self, before: impl Into<String>) -> Self {
49        self.before = Some(before.into());
50        self
51    }
52
53    pub fn count(mut self, count: impl Into<String>) -> Self {
54        self.count = Some(count.into());
55        self
56    }
57
58    pub fn page(mut self, page: impl Into<String>) -> Self {
59        self.page = Some(page.into());
60        self
61    }
62
63    pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
64        self.cursor = Some(cursor.into());
65        self
66    }
67
68    pub fn limit(mut self, limit: i64) -> Self {
69        self.limit = Some(limit);
70        self
71    }
72
73    pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
74        self.team_id = Some(team_id.into());
75        self
76    }
77}
78
79impl SlackApiMethod for TeamAccessLogsRequest {
80    const METHOD: &'static str = "team.accessLogs";
81    type Response = TeamAccessLogsResponse;
82}
83
84impl CursorPaginated for TeamAccessLogsRequest {
85    fn set_cursor(&mut self, cursor: String) {
86        self.cursor = Some(cursor);
87    }
88}
89
90impl NextCursor for TeamAccessLogsResponse {
91    fn next_cursor(&self) -> Option<&str> {
92        self.response_metadata.as_ref()?.next_cursor.as_deref()
93    }
94}
95
96/// Successful response of the Slack Web API method [`team.accessLogs`](https://docs.slack.dev/reference/methods/team.accessLogs).
97#[doc(alias = "team.accessLogs")]
98#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
99pub struct TeamAccessLogsResponse {
100    #[serde(
101        default,
102        deserialize_with = "crate::de::vec",
103        skip_serializing_if = "Vec::is_empty"
104    )]
105    pub logins: Vec<TeamAccessLogsResponseLogins>,
106    #[serde(
107        default,
108        deserialize_with = "crate::de::opt_object",
109        skip_serializing_if = "Option::is_none"
110    )]
111    pub paging: Option<TeamAccessLogsResponsePaging>,
112    #[serde(
113        default,
114        deserialize_with = "crate::de::opt_object",
115        skip_serializing_if = "Option::is_none"
116    )]
117    pub response_metadata: Option<ResponseMetadata>,
118    #[serde(
119        default,
120        deserialize_with = "crate::de::opt_string",
121        skip_serializing_if = "Option::is_none"
122    )]
123    pub warning: Option<String>,
124}
125
126#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
127pub struct TeamAccessLogsResponseLogins {
128    #[serde(
129        default,
130        deserialize_with = "crate::de::opt_string",
131        skip_serializing_if = "Option::is_none"
132    )]
133    pub user_id: Option<String>,
134    #[serde(
135        default,
136        deserialize_with = "crate::de::opt_string",
137        skip_serializing_if = "Option::is_none"
138    )]
139    pub username: Option<String>,
140    #[serde(
141        default,
142        deserialize_with = "crate::de::opt_i64",
143        skip_serializing_if = "Option::is_none"
144    )]
145    pub date_first: Option<i64>,
146    #[serde(
147        default,
148        deserialize_with = "crate::de::opt_i64",
149        skip_serializing_if = "Option::is_none"
150    )]
151    pub date_last: Option<i64>,
152    #[serde(
153        default,
154        deserialize_with = "crate::de::opt_i64",
155        skip_serializing_if = "Option::is_none"
156    )]
157    pub count: Option<i64>,
158    #[serde(
159        default,
160        deserialize_with = "crate::de::opt_string",
161        skip_serializing_if = "Option::is_none"
162    )]
163    pub ip: Option<String>,
164    #[serde(
165        default,
166        deserialize_with = "crate::de::opt_string",
167        skip_serializing_if = "Option::is_none"
168    )]
169    pub user_agent: Option<String>,
170    #[serde(
171        default,
172        deserialize_with = "crate::de::opt_string",
173        skip_serializing_if = "Option::is_none"
174    )]
175    pub isp: Option<String>,
176    #[serde(
177        default,
178        deserialize_with = "crate::de::opt_string",
179        skip_serializing_if = "Option::is_none"
180    )]
181    pub country: Option<String>,
182    #[serde(
183        default,
184        deserialize_with = "crate::de::opt_string",
185        skip_serializing_if = "Option::is_none"
186    )]
187    pub region: Option<String>,
188}
189
190#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
191pub struct TeamAccessLogsResponsePaging {
192    #[serde(
193        default,
194        deserialize_with = "crate::de::opt_i64",
195        skip_serializing_if = "Option::is_none"
196    )]
197    pub count: Option<i64>,
198    #[serde(
199        default,
200        deserialize_with = "crate::de::opt_i64",
201        skip_serializing_if = "Option::is_none"
202    )]
203    pub total: Option<i64>,
204    #[serde(
205        default,
206        deserialize_with = "crate::de::opt_i64",
207        skip_serializing_if = "Option::is_none"
208    )]
209    pub page: Option<i64>,
210    #[serde(
211        default,
212        deserialize_with = "crate::de::opt_i64",
213        skip_serializing_if = "Option::is_none"
214    )]
215    pub pages: Option<i64>,
216}
217
218/// Arguments for the Slack Web API method [`team.billableInfo`](https://docs.slack.dev/reference/methods/team.billableInfo): Gets billable users information for the current team.
219///
220/// Send it with [`SlackClient::team_billable_info`].
221#[doc(alias = "team.billableInfo")]
222#[derive(Debug, Clone, PartialEq, Serialize, Default)]
223#[non_exhaustive]
224pub struct TeamBillableInfoRequest {
225    /// Set `cursor` to `next_cursor` returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page.
226    #[serde(skip_serializing_if = "Option::is_none")]
227    pub cursor: Option<String>,
228    /// The maximum number of items to return.
229    #[serde(skip_serializing_if = "Option::is_none")]
230    pub limit: Option<i64>,
231    /// A user to retrieve the billable information for. Defaults to all users.
232    #[serde(skip_serializing_if = "Option::is_none")]
233    pub user: Option<String>,
234    /// encoded team id to get the billable information from, required if org token is used
235    #[serde(skip_serializing_if = "Option::is_none")]
236    pub team_id: Option<String>,
237}
238
239impl TeamBillableInfoRequest {
240    pub fn new() -> Self {
241        Self {
242            cursor: None,
243            limit: None,
244            user: None,
245            team_id: None,
246        }
247    }
248
249    pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
250        self.cursor = Some(cursor.into());
251        self
252    }
253
254    pub fn limit(mut self, limit: i64) -> Self {
255        self.limit = Some(limit);
256        self
257    }
258
259    pub fn user(mut self, user: impl Into<String>) -> Self {
260        self.user = Some(user.into());
261        self
262    }
263
264    pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
265        self.team_id = Some(team_id.into());
266        self
267    }
268}
269
270impl SlackApiMethod for TeamBillableInfoRequest {
271    const METHOD: &'static str = "team.billableInfo";
272    type Response = TeamBillableInfoResponse;
273}
274
275impl CursorPaginated for TeamBillableInfoRequest {
276    fn set_cursor(&mut self, cursor: String) {
277        self.cursor = Some(cursor);
278    }
279}
280
281impl NextCursor for TeamBillableInfoResponse {
282    fn next_cursor(&self) -> Option<&str> {
283        self.response_metadata.as_ref()?.next_cursor.as_deref()
284    }
285}
286
287/// Successful response of the Slack Web API method [`team.billableInfo`](https://docs.slack.dev/reference/methods/team.billableInfo).
288#[doc(alias = "team.billableInfo")]
289#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
290pub struct TeamBillableInfoResponse {
291    #[serde(
292        default,
293        deserialize_with = "crate::de::opt_object",
294        skip_serializing_if = "Option::is_none"
295    )]
296    pub billable_info:
297        Option<std::collections::HashMap<String, TeamBillableInfoResponseBillableInfoValue>>,
298    #[serde(
299        default,
300        deserialize_with = "crate::de::opt_object",
301        skip_serializing_if = "Option::is_none"
302    )]
303    pub response_metadata: Option<ResponseMetadata>,
304    #[serde(
305        default,
306        deserialize_with = "crate::de::opt_string",
307        skip_serializing_if = "Option::is_none"
308    )]
309    pub warning: Option<String>,
310}
311
312#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
313pub struct TeamBillableInfoResponseBillableInfoValue {
314    #[serde(
315        default,
316        deserialize_with = "crate::de::opt_bool",
317        skip_serializing_if = "Option::is_none"
318    )]
319    pub billing_active: Option<bool>,
320}
321
322/// Arguments for the Slack Web API method [`team.billing.info`](https://docs.slack.dev/reference/methods/team.billing.info): Reads a workspace's billing plan information.
323///
324/// Send it with [`SlackClient::team_billing_info`].
325#[doc(alias = "team.billing.info")]
326#[derive(Debug, Clone, PartialEq, Serialize, Default)]
327#[non_exhaustive]
328pub struct TeamBillingInfoRequest {}
329
330impl TeamBillingInfoRequest {
331    pub fn new() -> Self {
332        Self {}
333    }
334}
335
336impl SlackApiMethod for TeamBillingInfoRequest {
337    const METHOD: &'static str = "team.billing.info";
338    type Response = TeamBillingInfoResponse;
339}
340
341/// Successful response of the Slack Web API method [`team.billing.info`](https://docs.slack.dev/reference/methods/team.billing.info).
342#[doc(alias = "team.billing.info")]
343#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
344pub struct TeamBillingInfoResponse {
345    #[serde(
346        default,
347        deserialize_with = "crate::de::opt_string",
348        skip_serializing_if = "Option::is_none"
349    )]
350    pub plan: Option<String>,
351    #[serde(
352        default,
353        deserialize_with = "crate::de::opt_object",
354        skip_serializing_if = "Option::is_none"
355    )]
356    pub response_metadata: Option<ResponseMetadata>,
357    #[serde(
358        default,
359        deserialize_with = "crate::de::opt_string",
360        skip_serializing_if = "Option::is_none"
361    )]
362    pub warning: Option<String>,
363}
364
365/// Arguments for the Slack Web API method [`team.externalTeams.disconnect`](https://docs.slack.dev/reference/methods/team.externalTeams.disconnect): Disconnect an external organization.
366///
367/// Send it with [`SlackClient::team_external_teams_disconnect`].
368#[doc(alias = "team.externalTeams.disconnect")]
369#[derive(Debug, Clone, PartialEq, Serialize)]
370#[non_exhaustive]
371pub struct TeamExternalTeamsDisconnectRequest {
372    /// The team ID of the target team.
373    pub target_team: String,
374}
375
376impl TeamExternalTeamsDisconnectRequest {
377    pub fn new(target_team: impl Into<String>) -> Self {
378        Self {
379            target_team: target_team.into(),
380        }
381    }
382}
383
384impl SlackApiMethod for TeamExternalTeamsDisconnectRequest {
385    const METHOD: &'static str = "team.externalTeams.disconnect";
386    type Response = TeamExternalTeamsDisconnectResponse;
387}
388
389/// Successful response of the Slack Web API method [`team.externalTeams.disconnect`](https://docs.slack.dev/reference/methods/team.externalTeams.disconnect).
390#[doc(alias = "team.externalTeams.disconnect")]
391#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
392pub struct TeamExternalTeamsDisconnectResponse {
393    /// Fields returned by Slack. This method has no documented response example.
394    #[serde(flatten)]
395    pub extra: serde_json::Map<String, serde_json::Value>,
396    #[serde(
397        default,
398        deserialize_with = "crate::de::opt_object",
399        skip_serializing_if = "Option::is_none"
400    )]
401    pub response_metadata: Option<ResponseMetadata>,
402    #[serde(
403        default,
404        deserialize_with = "crate::de::opt_string",
405        skip_serializing_if = "Option::is_none"
406    )]
407    pub warning: Option<String>,
408}
409
410/// Arguments for the Slack Web API method [`team.externalTeams.list`](https://docs.slack.dev/reference/methods/team.externalTeams.list): Returns a list of all the external teams connected and details about the connection.
411///
412/// Send it with [`SlackClient::team_external_teams_list`].
413#[doc(alias = "team.externalTeams.list")]
414#[derive(Debug, Clone, PartialEq, Serialize, Default)]
415#[non_exhaustive]
416pub struct TeamExternalTeamsListRequest {
417    /// The maximum number of items to return per page
418    #[serde(skip_serializing_if = "Option::is_none")]
419    pub limit: Option<i64>,
420    /// Paginate through collections of data by setting parameter to the `team_id` attribute returned by a previous request's `response_metadata`. If not provided, the first page of the collection is returned. See [pagination](https://docs.slack.dev/apis/web-api/pagination.md#cursors) for more detail.
421    #[serde(skip_serializing_if = "Option::is_none")]
422    pub cursor: Option<String>,
423    /// Name of the parameter that we are sorting by
424    #[serde(skip_serializing_if = "Option::is_none")]
425    pub sort_field: Option<String>,
426    /// Direction to sort in asc or desc
427    #[serde(skip_serializing_if = "Option::is_none")]
428    pub sort_direction: Option<String>,
429    /// Filters connected orgs by Slack Connect pref override(s). Value can be: `approved_orgs_only` `allow_sc_file_uploads` `profile_visibility` `away_team_sc_invite_permissions` `accept_sc_invites` `sc_mpdm_to_private` `require_sc_channel_for_sc_dm` `external_awareness_context_bar`
430    #[serde(
431        skip_serializing_if = "Option::is_none",
432        serialize_with = "crate::form::as_json"
433    )]
434    pub slack_connect_pref_filter: Option<Vec<serde_json::Value>>,
435    /// Shows connected orgs which are connected on a specified encoded workspace ID
436    #[serde(
437        skip_serializing_if = "Option::is_none",
438        serialize_with = "crate::form::as_json"
439    )]
440    pub workspace_filter: Option<Vec<serde_json::Value>>,
441    /// Status of the connected team.
442    #[serde(skip_serializing_if = "Option::is_none")]
443    pub connection_status_filter: Option<String>,
444}
445
446impl TeamExternalTeamsListRequest {
447    pub fn new() -> Self {
448        Self {
449            limit: None,
450            cursor: None,
451            sort_field: None,
452            sort_direction: None,
453            slack_connect_pref_filter: None,
454            workspace_filter: None,
455            connection_status_filter: None,
456        }
457    }
458
459    pub fn limit(mut self, limit: i64) -> Self {
460        self.limit = Some(limit);
461        self
462    }
463
464    pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
465        self.cursor = Some(cursor.into());
466        self
467    }
468
469    pub fn sort_field(mut self, sort_field: impl Into<String>) -> Self {
470        self.sort_field = Some(sort_field.into());
471        self
472    }
473
474    pub fn sort_direction(mut self, sort_direction: impl Into<String>) -> Self {
475        self.sort_direction = Some(sort_direction.into());
476        self
477    }
478
479    pub fn slack_connect_pref_filter(
480        mut self,
481        slack_connect_pref_filter: Vec<serde_json::Value>,
482    ) -> Self {
483        self.slack_connect_pref_filter = Some(slack_connect_pref_filter);
484        self
485    }
486
487    pub fn workspace_filter(mut self, workspace_filter: Vec<serde_json::Value>) -> Self {
488        self.workspace_filter = Some(workspace_filter);
489        self
490    }
491
492    pub fn connection_status_filter(mut self, connection_status_filter: impl Into<String>) -> Self {
493        self.connection_status_filter = Some(connection_status_filter.into());
494        self
495    }
496}
497
498impl SlackApiMethod for TeamExternalTeamsListRequest {
499    const METHOD: &'static str = "team.externalTeams.list";
500    type Response = TeamExternalTeamsListResponse;
501}
502
503impl CursorPaginated for TeamExternalTeamsListRequest {
504    fn set_cursor(&mut self, cursor: String) {
505        self.cursor = Some(cursor);
506    }
507}
508
509impl NextCursor for TeamExternalTeamsListResponse {
510    fn next_cursor(&self) -> Option<&str> {
511        self.response_metadata.as_ref()?.next_cursor.as_deref()
512    }
513}
514
515/// Successful response of the Slack Web API method [`team.externalTeams.list`](https://docs.slack.dev/reference/methods/team.externalTeams.list).
516#[doc(alias = "team.externalTeams.list")]
517#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
518pub struct TeamExternalTeamsListResponse {
519    #[serde(
520        default,
521        deserialize_with = "crate::de::vec",
522        skip_serializing_if = "Vec::is_empty"
523    )]
524    pub organizations: Vec<TeamExternalTeamsListResponseOrganizations>,
525    #[serde(
526        default,
527        deserialize_with = "crate::de::opt_i64",
528        skip_serializing_if = "Option::is_none"
529    )]
530    pub total_count: Option<i64>,
531    #[serde(
532        default,
533        deserialize_with = "crate::de::opt_object",
534        skip_serializing_if = "Option::is_none"
535    )]
536    pub response_metadata: Option<ResponseMetadata>,
537    #[serde(
538        default,
539        deserialize_with = "crate::de::opt_string",
540        skip_serializing_if = "Option::is_none"
541    )]
542    pub warning: Option<String>,
543}
544
545#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
546pub struct TeamExternalTeamsListResponseOrganizations {
547    #[serde(
548        default,
549        deserialize_with = "crate::de::opt_string",
550        skip_serializing_if = "Option::is_none"
551    )]
552    pub team_id: Option<String>,
553    #[serde(
554        default,
555        deserialize_with = "crate::de::opt_string",
556        skip_serializing_if = "Option::is_none"
557    )]
558    pub team_name: Option<String>,
559    #[serde(
560        default,
561        deserialize_with = "crate::de::opt_string",
562        skip_serializing_if = "Option::is_none"
563    )]
564    pub team_domain: Option<String>,
565    #[serde(
566        default,
567        deserialize_with = "crate::de::opt_i64",
568        skip_serializing_if = "Option::is_none"
569    )]
570    pub public_channel_count: Option<i64>,
571    #[serde(
572        default,
573        deserialize_with = "crate::de::opt_i64",
574        skip_serializing_if = "Option::is_none"
575    )]
576    pub private_channel_count: Option<i64>,
577    #[serde(
578        default,
579        deserialize_with = "crate::de::opt_i64",
580        skip_serializing_if = "Option::is_none"
581    )]
582    pub im_channel_count: Option<i64>,
583    #[serde(
584        default,
585        deserialize_with = "crate::de::opt_i64",
586        skip_serializing_if = "Option::is_none"
587    )]
588    pub mpim_channel_count: Option<i64>,
589    #[serde(
590        default,
591        deserialize_with = "crate::de::opt_object",
592        skip_serializing_if = "Option::is_none"
593    )]
594    pub connected_workspaces: Option<TeamExternalTeamsListResponseOrganizationsConnectedWorkspaces>,
595    #[serde(
596        default,
597        deserialize_with = "crate::de::opt_object",
598        skip_serializing_if = "Option::is_none"
599    )]
600    pub slack_connect_prefs: Option<serde_json::Map<String, serde_json::Value>>,
601    #[serde(
602        default,
603        deserialize_with = "crate::de::opt_string",
604        skip_serializing_if = "Option::is_none"
605    )]
606    pub connection_status: Option<String>,
607    #[serde(
608        default,
609        deserialize_with = "crate::de::opt_i64",
610        skip_serializing_if = "Option::is_none"
611    )]
612    pub last_active_timestamp: Option<i64>,
613    #[serde(
614        default,
615        deserialize_with = "crate::de::opt_bool",
616        skip_serializing_if = "Option::is_none"
617    )]
618    pub is_sponsored: Option<bool>,
619    #[serde(
620        default,
621        deserialize_with = "crate::de::opt_object",
622        skip_serializing_if = "Option::is_none"
623    )]
624    pub canvas: Option<TeamExternalTeamsListResponseOrganizationsCanvas>,
625    #[serde(
626        default,
627        deserialize_with = "crate::de::opt_object",
628        skip_serializing_if = "Option::is_none"
629    )]
630    pub lists: Option<TeamExternalTeamsListResponseOrganizationsLists>,
631}
632
633#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
634pub struct TeamExternalTeamsListResponseOrganizationsConnectedWorkspaces {
635    #[serde(
636        default,
637        deserialize_with = "crate::de::opt_string",
638        skip_serializing_if = "Option::is_none"
639    )]
640    pub workspace_id: Option<String>,
641    #[serde(
642        default,
643        deserialize_with = "crate::de::opt_string",
644        skip_serializing_if = "Option::is_none"
645    )]
646    pub workspace_name: Option<String>,
647}
648
649#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
650pub struct TeamExternalTeamsListResponseOrganizationsCanvas {
651    #[serde(
652        default,
653        deserialize_with = "crate::de::opt_i64",
654        skip_serializing_if = "Option::is_none"
655    )]
656    pub total_count: Option<i64>,
657    #[serde(
658        default,
659        deserialize_with = "crate::de::vec",
660        skip_serializing_if = "Vec::is_empty"
661    )]
662    pub ownership_details: Vec<TeamExternalTeamsListResponseOrganizationsCanvasOwnershipDetails>,
663}
664
665#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
666pub struct TeamExternalTeamsListResponseOrganizationsCanvasOwnershipDetails {
667    #[serde(
668        default,
669        deserialize_with = "crate::de::opt_string",
670        skip_serializing_if = "Option::is_none"
671    )]
672    pub team_id: Option<String>,
673    #[serde(
674        default,
675        deserialize_with = "crate::de::opt_i64",
676        skip_serializing_if = "Option::is_none"
677    )]
678    pub count: Option<i64>,
679}
680
681#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
682pub struct TeamExternalTeamsListResponseOrganizationsLists {
683    #[serde(
684        default,
685        deserialize_with = "crate::de::opt_i64",
686        skip_serializing_if = "Option::is_none"
687    )]
688    pub total_count: Option<i64>,
689    #[serde(
690        default,
691        deserialize_with = "crate::de::vec",
692        skip_serializing_if = "Vec::is_empty"
693    )]
694    pub ownership_details: Vec<TeamExternalTeamsListResponseOrganizationsListsOwnershipDetails>,
695}
696
697#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
698pub struct TeamExternalTeamsListResponseOrganizationsListsOwnershipDetails {
699    #[serde(
700        default,
701        deserialize_with = "crate::de::opt_string",
702        skip_serializing_if = "Option::is_none"
703    )]
704    pub team_id: Option<String>,
705    #[serde(
706        default,
707        deserialize_with = "crate::de::opt_i64",
708        skip_serializing_if = "Option::is_none"
709    )]
710    pub count: Option<i64>,
711}
712
713/// Arguments for the Slack Web API method [`team.info`](https://docs.slack.dev/reference/methods/team.info): Gets information about the current team.
714///
715/// Send it with [`SlackClient::team_info`].
716#[doc(alias = "team.info")]
717#[derive(Debug, Clone, PartialEq, Serialize, Default)]
718#[non_exhaustive]
719pub struct TeamInfoRequest {
720    /// Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty.
721    #[serde(skip_serializing_if = "Option::is_none")]
722    pub domain: Option<String>,
723    /// Team to get info about; if omitted, will return information about the current team.
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub team: Option<String>,
726}
727
728impl TeamInfoRequest {
729    pub fn new() -> Self {
730        Self {
731            domain: None,
732            team: None,
733        }
734    }
735
736    pub fn domain(mut self, domain: impl Into<String>) -> Self {
737        self.domain = Some(domain.into());
738        self
739    }
740
741    pub fn team(mut self, team: impl Into<String>) -> Self {
742        self.team = Some(team.into());
743        self
744    }
745}
746
747impl SlackApiMethod for TeamInfoRequest {
748    const METHOD: &'static str = "team.info";
749    type Response = TeamInfoResponse;
750}
751
752/// Successful response of the Slack Web API method [`team.info`](https://docs.slack.dev/reference/methods/team.info).
753#[doc(alias = "team.info")]
754#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
755pub struct TeamInfoResponse {
756    #[serde(
757        default,
758        deserialize_with = "crate::de::opt_object",
759        skip_serializing_if = "Option::is_none"
760    )]
761    pub team: Option<Team>,
762    #[serde(
763        default,
764        deserialize_with = "crate::de::opt_object",
765        skip_serializing_if = "Option::is_none"
766    )]
767    pub response_metadata: Option<ResponseMetadata>,
768    #[serde(
769        default,
770        deserialize_with = "crate::de::opt_string",
771        skip_serializing_if = "Option::is_none"
772    )]
773    pub warning: Option<String>,
774}
775
776/// Arguments for the Slack Web API method [`team.integrationLogs`](https://docs.slack.dev/reference/methods/team.integrationLogs): Gets the integration logs for the current team.
777///
778/// Send it with [`SlackClient::team_integration_logs`].
779#[doc(alias = "team.integrationLogs")]
780#[derive(Debug, Clone, PartialEq, Serialize, Default)]
781#[non_exhaustive]
782pub struct TeamIntegrationLogsRequest {
783    /// Filter logs to this Slack app. Defaults to all logs.
784    #[serde(skip_serializing_if = "Option::is_none")]
785    pub app_id: Option<String>,
786    /// Filter logs with this change type. Possible values are `added`, `removed`, `enabled`, `disabled`, and `updated`. Defaults to all logs.
787    #[serde(skip_serializing_if = "Option::is_none")]
788    pub change_type: Option<String>,
789    #[serde(skip_serializing_if = "Option::is_none")]
790    pub count: Option<String>,
791    #[serde(skip_serializing_if = "Option::is_none")]
792    pub page: Option<String>,
793    /// Filter logs to this service. Defaults to all logs.
794    #[serde(skip_serializing_if = "Option::is_none")]
795    pub service_id: Option<String>,
796    /// encoded team id to get logs from, required if org token is used
797    #[serde(skip_serializing_if = "Option::is_none")]
798    pub team_id: Option<String>,
799    /// Filter logs generated by this user’s actions. Defaults to all logs.
800    #[serde(skip_serializing_if = "Option::is_none")]
801    pub user: Option<String>,
802}
803
804impl TeamIntegrationLogsRequest {
805    pub fn new() -> Self {
806        Self {
807            app_id: None,
808            change_type: None,
809            count: None,
810            page: None,
811            service_id: None,
812            team_id: None,
813            user: None,
814        }
815    }
816
817    pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
818        self.app_id = Some(app_id.into());
819        self
820    }
821
822    pub fn change_type(mut self, change_type: impl Into<String>) -> Self {
823        self.change_type = Some(change_type.into());
824        self
825    }
826
827    pub fn count(mut self, count: impl Into<String>) -> Self {
828        self.count = Some(count.into());
829        self
830    }
831
832    pub fn page(mut self, page: impl Into<String>) -> Self {
833        self.page = Some(page.into());
834        self
835    }
836
837    pub fn service_id(mut self, service_id: impl Into<String>) -> Self {
838        self.service_id = Some(service_id.into());
839        self
840    }
841
842    pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
843        self.team_id = Some(team_id.into());
844        self
845    }
846
847    pub fn user(mut self, user: impl Into<String>) -> Self {
848        self.user = Some(user.into());
849        self
850    }
851}
852
853impl SlackApiMethod for TeamIntegrationLogsRequest {
854    const METHOD: &'static str = "team.integrationLogs";
855    type Response = TeamIntegrationLogsResponse;
856}
857
858/// Successful response of the Slack Web API method [`team.integrationLogs`](https://docs.slack.dev/reference/methods/team.integrationLogs).
859#[doc(alias = "team.integrationLogs")]
860#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
861pub struct TeamIntegrationLogsResponse {
862    #[serde(
863        default,
864        deserialize_with = "crate::de::vec",
865        skip_serializing_if = "Vec::is_empty"
866    )]
867    pub logs: Vec<TeamIntegrationLogsResponseLogs>,
868    #[serde(
869        default,
870        deserialize_with = "crate::de::opt_object",
871        skip_serializing_if = "Option::is_none"
872    )]
873    pub paging: Option<TeamIntegrationLogsResponsePaging>,
874    #[serde(
875        default,
876        deserialize_with = "crate::de::opt_object",
877        skip_serializing_if = "Option::is_none"
878    )]
879    pub response_metadata: Option<ResponseMetadata>,
880    #[serde(
881        default,
882        deserialize_with = "crate::de::opt_string",
883        skip_serializing_if = "Option::is_none"
884    )]
885    pub warning: Option<String>,
886}
887
888#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
889pub struct TeamIntegrationLogsResponseLogs {
890    #[serde(
891        default,
892        deserialize_with = "crate::de::opt_i64",
893        skip_serializing_if = "Option::is_none"
894    )]
895    pub service_id: Option<i64>,
896    #[serde(
897        default,
898        deserialize_with = "crate::de::opt_string",
899        skip_serializing_if = "Option::is_none"
900    )]
901    pub service_type: Option<String>,
902    #[serde(
903        default,
904        deserialize_with = "crate::de::opt_string",
905        skip_serializing_if = "Option::is_none"
906    )]
907    pub user_id: Option<String>,
908    #[serde(
909        default,
910        deserialize_with = "crate::de::opt_string",
911        skip_serializing_if = "Option::is_none"
912    )]
913    pub user_name: Option<String>,
914    #[serde(
915        default,
916        deserialize_with = "crate::de::opt_string",
917        skip_serializing_if = "Option::is_none"
918    )]
919    pub channel: Option<String>,
920    #[serde(
921        default,
922        deserialize_with = "crate::de::opt_string",
923        skip_serializing_if = "Option::is_none"
924    )]
925    pub date: Option<String>,
926    #[serde(
927        default,
928        deserialize_with = "crate::de::opt_string",
929        skip_serializing_if = "Option::is_none"
930    )]
931    pub change_type: Option<String>,
932    #[serde(
933        default,
934        deserialize_with = "crate::de::opt_string",
935        skip_serializing_if = "Option::is_none"
936    )]
937    pub scope: Option<String>,
938    #[serde(
939        default,
940        deserialize_with = "crate::de::opt_string",
941        skip_serializing_if = "Option::is_none"
942    )]
943    pub app_id: Option<String>,
944    #[serde(
945        default,
946        deserialize_with = "crate::de::opt_string",
947        skip_serializing_if = "Option::is_none"
948    )]
949    pub app_type: Option<String>,
950    #[serde(
951        default,
952        deserialize_with = "crate::de::opt_string",
953        skip_serializing_if = "Option::is_none"
954    )]
955    pub reason: Option<String>,
956}
957
958#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
959pub struct TeamIntegrationLogsResponsePaging {
960    #[serde(
961        default,
962        deserialize_with = "crate::de::opt_i64",
963        skip_serializing_if = "Option::is_none"
964    )]
965    pub count: Option<i64>,
966    #[serde(
967        default,
968        deserialize_with = "crate::de::opt_i64",
969        skip_serializing_if = "Option::is_none"
970    )]
971    pub total: Option<i64>,
972    #[serde(
973        default,
974        deserialize_with = "crate::de::opt_i64",
975        skip_serializing_if = "Option::is_none"
976    )]
977    pub page: Option<i64>,
978    #[serde(
979        default,
980        deserialize_with = "crate::de::opt_i64",
981        skip_serializing_if = "Option::is_none"
982    )]
983    pub pages: Option<i64>,
984}
985
986/// Arguments for the Slack Web API method [`team.preferences.list`](https://docs.slack.dev/reference/methods/team.preferences.list): Retrieve a list of a workspace's team preferences.
987///
988/// Send it with [`SlackClient::team_preferences_list`].
989#[doc(alias = "team.preferences.list")]
990#[derive(Debug, Clone, PartialEq, Serialize, Default)]
991#[non_exhaustive]
992pub struct TeamPreferencesListRequest {}
993
994impl TeamPreferencesListRequest {
995    pub fn new() -> Self {
996        Self {}
997    }
998}
999
1000impl SlackApiMethod for TeamPreferencesListRequest {
1001    const METHOD: &'static str = "team.preferences.list";
1002    type Response = TeamPreferencesListResponse;
1003}
1004
1005/// Successful response of the Slack Web API method [`team.preferences.list`](https://docs.slack.dev/reference/methods/team.preferences.list).
1006#[doc(alias = "team.preferences.list")]
1007#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1008pub struct TeamPreferencesListResponse {
1009    #[serde(
1010        default,
1011        deserialize_with = "crate::de::opt_bool",
1012        skip_serializing_if = "Option::is_none"
1013    )]
1014    pub display_real_names: Option<bool>,
1015    #[serde(
1016        default,
1017        deserialize_with = "crate::de::opt_string",
1018        skip_serializing_if = "Option::is_none"
1019    )]
1020    pub disable_file_uploads: Option<String>,
1021    #[serde(
1022        default,
1023        deserialize_with = "crate::de::opt_i64",
1024        skip_serializing_if = "Option::is_none"
1025    )]
1026    pub msg_edit_window_mins: Option<i64>,
1027    #[serde(
1028        default,
1029        deserialize_with = "crate::de::opt_string",
1030        skip_serializing_if = "Option::is_none"
1031    )]
1032    pub who_can_post_general: Option<String>,
1033    #[serde(
1034        default,
1035        deserialize_with = "crate::de::opt_object",
1036        skip_serializing_if = "Option::is_none"
1037    )]
1038    pub response_metadata: Option<ResponseMetadata>,
1039    #[serde(
1040        default,
1041        deserialize_with = "crate::de::opt_string",
1042        skip_serializing_if = "Option::is_none"
1043    )]
1044    pub warning: Option<String>,
1045}
1046
1047/// Arguments for the Slack Web API method [`team.profile.get`](https://docs.slack.dev/reference/methods/team.profile.get): Retrieve a team's profile.
1048///
1049/// Send it with [`SlackClient::team_profile_get`].
1050#[doc(alias = "team.profile.get")]
1051#[derive(Debug, Clone, PartialEq, Serialize, Default)]
1052#[non_exhaustive]
1053pub struct TeamProfileGetRequest {
1054    /// Filter by visibility.
1055    #[serde(skip_serializing_if = "Option::is_none")]
1056    pub visibility: Option<String>,
1057}
1058
1059impl TeamProfileGetRequest {
1060    pub fn new() -> Self {
1061        Self { visibility: None }
1062    }
1063
1064    pub fn visibility(mut self, visibility: impl Into<String>) -> Self {
1065        self.visibility = Some(visibility.into());
1066        self
1067    }
1068}
1069
1070impl SlackApiMethod for TeamProfileGetRequest {
1071    const METHOD: &'static str = "team.profile.get";
1072    type Response = TeamProfileGetResponse;
1073}
1074
1075/// Successful response of the Slack Web API method [`team.profile.get`](https://docs.slack.dev/reference/methods/team.profile.get).
1076#[doc(alias = "team.profile.get")]
1077#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1078pub struct TeamProfileGetResponse {
1079    #[serde(
1080        default,
1081        deserialize_with = "crate::de::opt_object",
1082        skip_serializing_if = "Option::is_none"
1083    )]
1084    pub profile: Option<TeamProfileGetResponseProfile>,
1085    #[serde(
1086        default,
1087        deserialize_with = "crate::de::opt_object",
1088        skip_serializing_if = "Option::is_none"
1089    )]
1090    pub response_metadata: Option<ResponseMetadata>,
1091    #[serde(
1092        default,
1093        deserialize_with = "crate::de::opt_string",
1094        skip_serializing_if = "Option::is_none"
1095    )]
1096    pub warning: Option<String>,
1097}
1098
1099#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1100pub struct TeamProfileGetResponseProfile {
1101    #[serde(
1102        default,
1103        deserialize_with = "crate::de::vec",
1104        skip_serializing_if = "Vec::is_empty"
1105    )]
1106    pub fields: Vec<TeamProfileGetResponseProfileFields>,
1107    #[serde(
1108        default,
1109        deserialize_with = "crate::de::vec",
1110        skip_serializing_if = "Vec::is_empty"
1111    )]
1112    pub sections: Vec<TeamProfileGetResponseProfileSections>,
1113}
1114
1115#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1116pub struct TeamProfileGetResponseProfileFields {
1117    #[serde(
1118        default,
1119        deserialize_with = "crate::de::opt_string",
1120        skip_serializing_if = "Option::is_none"
1121    )]
1122    pub id: Option<String>,
1123    #[serde(
1124        default,
1125        deserialize_with = "crate::de::opt_i64",
1126        skip_serializing_if = "Option::is_none"
1127    )]
1128    pub ordering: Option<i64>,
1129    #[serde(
1130        default,
1131        deserialize_with = "crate::de::opt_string",
1132        skip_serializing_if = "Option::is_none"
1133    )]
1134    pub label: Option<String>,
1135    #[serde(
1136        default,
1137        deserialize_with = "crate::de::opt_string",
1138        skip_serializing_if = "Option::is_none"
1139    )]
1140    pub hint: Option<String>,
1141    #[serde(
1142        default,
1143        deserialize_with = "crate::de::opt_string",
1144        skip_serializing_if = "Option::is_none"
1145    )]
1146    pub r#type: Option<String>,
1147    #[serde(
1148        default,
1149        deserialize_with = "crate::de::vec",
1150        skip_serializing_if = "Vec::is_empty"
1151    )]
1152    pub possible_values: Vec<String>,
1153    #[serde(
1154        default,
1155        deserialize_with = "crate::de::opt_object",
1156        skip_serializing_if = "Option::is_none"
1157    )]
1158    pub options: Option<TeamProfileGetResponseProfileFieldsOptions>,
1159    #[serde(
1160        default,
1161        deserialize_with = "crate::de::opt_bool",
1162        skip_serializing_if = "Option::is_none"
1163    )]
1164    pub is_hidden: Option<bool>,
1165    #[serde(
1166        default,
1167        deserialize_with = "crate::de::opt_string",
1168        skip_serializing_if = "Option::is_none"
1169    )]
1170    pub section_id: Option<String>,
1171}
1172
1173#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1174pub struct TeamProfileGetResponseProfileFieldsOptions {
1175    #[serde(
1176        default,
1177        deserialize_with = "crate::de::opt_bool",
1178        skip_serializing_if = "Option::is_none"
1179    )]
1180    pub is_scim: Option<bool>,
1181    #[serde(
1182        default,
1183        deserialize_with = "crate::de::opt_bool",
1184        skip_serializing_if = "Option::is_none"
1185    )]
1186    pub is_protected: Option<bool>,
1187}
1188
1189#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1190pub struct TeamProfileGetResponseProfileSections {
1191    #[serde(
1192        default,
1193        deserialize_with = "crate::de::opt_string",
1194        skip_serializing_if = "Option::is_none"
1195    )]
1196    pub id: Option<String>,
1197    #[serde(
1198        default,
1199        deserialize_with = "crate::de::opt_string",
1200        skip_serializing_if = "Option::is_none"
1201    )]
1202    pub team_id: Option<String>,
1203    #[serde(
1204        default,
1205        deserialize_with = "crate::de::opt_string",
1206        skip_serializing_if = "Option::is_none"
1207    )]
1208    pub section_type: Option<String>,
1209    #[serde(
1210        default,
1211        deserialize_with = "crate::de::opt_string",
1212        skip_serializing_if = "Option::is_none"
1213    )]
1214    pub label: Option<String>,
1215    #[serde(
1216        default,
1217        deserialize_with = "crate::de::opt_i64",
1218        skip_serializing_if = "Option::is_none"
1219    )]
1220    pub order: Option<i64>,
1221    #[serde(
1222        default,
1223        deserialize_with = "crate::de::opt_bool",
1224        skip_serializing_if = "Option::is_none"
1225    )]
1226    pub is_hidden: Option<bool>,
1227}
1228
1229impl SlackClient {
1230    /// Calls the Slack Web API method [`team.accessLogs`](https://docs.slack.dev/reference/methods/team.accessLogs): Gets the access logs for the current team.
1231    ///
1232    /// Required scopes:
1233    ///
1234    /// - user token: `admin`
1235    ///
1236    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1237    ///
1238    /// # Errors
1239    ///
1240    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1241    #[doc(alias = "team.accessLogs")]
1242    pub async fn team_access_logs(
1243        &self,
1244        request: &TeamAccessLogsRequest,
1245    ) -> Result<TeamAccessLogsResponse, SlackError> {
1246        self.call(request).await
1247    }
1248
1249    /// Calls the Slack Web API method [`team.billableInfo`](https://docs.slack.dev/reference/methods/team.billableInfo): Gets billable users information for the current team.
1250    ///
1251    /// Required scopes:
1252    ///
1253    /// - user token: `admin`
1254    ///
1255    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1256    ///
1257    /// # Errors
1258    ///
1259    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1260    #[doc(alias = "team.billableInfo")]
1261    pub async fn team_billable_info(
1262        &self,
1263        request: &TeamBillableInfoRequest,
1264    ) -> Result<TeamBillableInfoResponse, SlackError> {
1265        self.call(request).await
1266    }
1267
1268    /// Calls the Slack Web API method [`team.billing.info`](https://docs.slack.dev/reference/methods/team.billing.info): Reads a workspace's billing plan information.
1269    ///
1270    /// Required scopes:
1271    ///
1272    /// - bot token: `team.billing:read`
1273    /// - user token: `team.billing:read`
1274    ///
1275    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1276    ///
1277    /// # Errors
1278    ///
1279    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1280    #[doc(alias = "team.billing.info")]
1281    pub async fn team_billing_info(
1282        &self,
1283        request: &TeamBillingInfoRequest,
1284    ) -> Result<TeamBillingInfoResponse, SlackError> {
1285        self.call(request).await
1286    }
1287
1288    /// Calls the Slack Web API method [`team.externalTeams.disconnect`](https://docs.slack.dev/reference/methods/team.externalTeams.disconnect): Disconnect an external organization.
1289    ///
1290    /// Required scopes:
1291    ///
1292    /// - bot token: `conversations.connect:manage`
1293    ///
1294    /// Rate limit: Tier 1 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1295    ///
1296    /// # Errors
1297    ///
1298    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1299    #[doc(alias = "team.externalTeams.disconnect")]
1300    pub async fn team_external_teams_disconnect(
1301        &self,
1302        request: &TeamExternalTeamsDisconnectRequest,
1303    ) -> Result<TeamExternalTeamsDisconnectResponse, SlackError> {
1304        self.call(request).await
1305    }
1306
1307    /// Calls the Slack Web API method [`team.externalTeams.list`](https://docs.slack.dev/reference/methods/team.externalTeams.list): Returns a list of all the external teams connected and details about the connection.
1308    ///
1309    /// Required scopes:
1310    ///
1311    /// - bot token: `conversations.connect:manage`, `team:read`
1312    ///
1313    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1314    ///
1315    /// # Errors
1316    ///
1317    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1318    #[doc(alias = "team.externalTeams.list")]
1319    pub async fn team_external_teams_list(
1320        &self,
1321        request: &TeamExternalTeamsListRequest,
1322    ) -> Result<TeamExternalTeamsListResponse, SlackError> {
1323        self.call(request).await
1324    }
1325
1326    /// Calls the Slack Web API method [`team.info`](https://docs.slack.dev/reference/methods/team.info): Gets information about the current team.
1327    ///
1328    /// Required scopes:
1329    ///
1330    /// - bot token: `team:read`
1331    /// - user token: `team:read`
1332    ///
1333    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1334    ///
1335    /// # Errors
1336    ///
1337    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1338    #[doc(alias = "team.info")]
1339    pub async fn team_info(
1340        &self,
1341        request: &TeamInfoRequest,
1342    ) -> Result<TeamInfoResponse, SlackError> {
1343        self.call(request).await
1344    }
1345
1346    /// Calls the Slack Web API method [`team.integrationLogs`](https://docs.slack.dev/reference/methods/team.integrationLogs): Gets the integration logs for the current team.
1347    ///
1348    /// Required scopes:
1349    ///
1350    /// - user token: `admin`
1351    ///
1352    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1353    ///
1354    /// # Errors
1355    ///
1356    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1357    #[doc(alias = "team.integrationLogs")]
1358    pub async fn team_integration_logs(
1359        &self,
1360        request: &TeamIntegrationLogsRequest,
1361    ) -> Result<TeamIntegrationLogsResponse, SlackError> {
1362        self.call(request).await
1363    }
1364
1365    /// Calls the Slack Web API method [`team.preferences.list`](https://docs.slack.dev/reference/methods/team.preferences.list): Retrieve a list of a workspace's team preferences.
1366    ///
1367    /// Required scopes:
1368    ///
1369    /// - bot token: `team.preferences:read`
1370    /// - user token: `team.preferences:read`
1371    ///
1372    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1373    ///
1374    /// # Errors
1375    ///
1376    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1377    #[doc(alias = "team.preferences.list")]
1378    pub async fn team_preferences_list(
1379        &self,
1380        request: &TeamPreferencesListRequest,
1381    ) -> Result<TeamPreferencesListResponse, SlackError> {
1382        self.call(request).await
1383    }
1384
1385    /// Calls the Slack Web API method [`team.profile.get`](https://docs.slack.dev/reference/methods/team.profile.get): Retrieve a team's profile.
1386    ///
1387    /// Required scopes:
1388    ///
1389    /// - bot token: `users.profile:read`
1390    /// - user token: `users.profile:read`
1391    ///
1392    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
1393    ///
1394    /// # Errors
1395    ///
1396    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
1397    #[doc(alias = "team.profile.get")]
1398    pub async fn team_profile_get(
1399        &self,
1400        request: &TeamProfileGetRequest,
1401    ) -> Result<TeamProfileGetResponse, SlackError> {
1402        self.call(request).await
1403    }
1404}