Skip to main content

slack_web_api/api/
calls.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 [`calls.add`](https://docs.slack.dev/reference/methods/calls.add): Registers a new Call.
12///
13/// Send it with [`SlackClient::calls_add`].
14#[doc(alias = "calls.add")]
15#[derive(Debug, Clone, PartialEq, Serialize)]
16#[non_exhaustive]
17pub struct CallsAddRequest {
18    /// An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.
19    pub external_unique_id: String,
20    /// The URL required for a client to join the Call.
21    pub join_url: String,
22    /// An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.
23    #[serde(skip_serializing_if = "Option::is_none")]
24    pub external_display_id: Option<String>,
25    /// When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
26    #[serde(skip_serializing_if = "Option::is_none")]
27    pub desktop_app_join_url: Option<String>,
28    /// Unix timestamp of the call start time
29    #[serde(skip_serializing_if = "Option::is_none")]
30    pub date_start: Option<i64>,
31    /// The name of the Call.
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub title: Option<String>,
34    /// The valid Slack user ID of the user who created this Call. When this method is called with a user token, the `created_by` field is optional and defaults to the authed user of the token. Otherwise, the field is required.
35    #[serde(skip_serializing_if = "Option::is_none")]
36    pub created_by: Option<String>,
37    /// The list of users to register as participants in the Call. [Read more on how to specify users here](https://docs.slack.dev/apis/web-api/using-the-calls-api.md#users).
38    #[serde(
39        skip_serializing_if = "Option::is_none",
40        serialize_with = "crate::form::as_json"
41    )]
42    pub users: Option<Vec<serde_json::Value>>,
43}
44
45impl CallsAddRequest {
46    pub fn new(external_unique_id: impl Into<String>, join_url: impl Into<String>) -> Self {
47        Self {
48            external_unique_id: external_unique_id.into(),
49            join_url: join_url.into(),
50            external_display_id: None,
51            desktop_app_join_url: None,
52            date_start: None,
53            title: None,
54            created_by: None,
55            users: None,
56        }
57    }
58
59    pub fn external_display_id(mut self, external_display_id: impl Into<String>) -> Self {
60        self.external_display_id = Some(external_display_id.into());
61        self
62    }
63
64    pub fn desktop_app_join_url(mut self, desktop_app_join_url: impl Into<String>) -> Self {
65        self.desktop_app_join_url = Some(desktop_app_join_url.into());
66        self
67    }
68
69    pub fn date_start(mut self, date_start: i64) -> Self {
70        self.date_start = Some(date_start);
71        self
72    }
73
74    pub fn title(mut self, title: impl Into<String>) -> Self {
75        self.title = Some(title.into());
76        self
77    }
78
79    pub fn created_by(mut self, created_by: impl Into<String>) -> Self {
80        self.created_by = Some(created_by.into());
81        self
82    }
83
84    pub fn users(mut self, users: Vec<serde_json::Value>) -> Self {
85        self.users = Some(users);
86        self
87    }
88}
89
90impl SlackApiMethod for CallsAddRequest {
91    const METHOD: &'static str = "calls.add";
92    type Response = CallsAddResponse;
93}
94
95/// Successful response of the Slack Web API method [`calls.add`](https://docs.slack.dev/reference/methods/calls.add).
96#[doc(alias = "calls.add")]
97#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
98pub struct CallsAddResponse {
99    #[serde(
100        default,
101        deserialize_with = "crate::de::opt_object",
102        skip_serializing_if = "Option::is_none"
103    )]
104    pub call: Option<CallsAddResponseCall>,
105    #[serde(
106        default,
107        deserialize_with = "crate::de::opt_object",
108        skip_serializing_if = "Option::is_none"
109    )]
110    pub response_metadata: Option<ResponseMetadata>,
111    #[serde(
112        default,
113        deserialize_with = "crate::de::opt_string",
114        skip_serializing_if = "Option::is_none"
115    )]
116    pub warning: Option<String>,
117}
118
119#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
120pub struct CallsAddResponseCall {
121    #[serde(
122        default,
123        deserialize_with = "crate::de::opt_string",
124        skip_serializing_if = "Option::is_none"
125    )]
126    pub id: Option<String>,
127    #[serde(
128        default,
129        deserialize_with = "crate::de::opt_i64",
130        skip_serializing_if = "Option::is_none"
131    )]
132    pub date_start: Option<i64>,
133    #[serde(
134        default,
135        deserialize_with = "crate::de::opt_string",
136        skip_serializing_if = "Option::is_none"
137    )]
138    pub external_unique_id: Option<String>,
139    #[serde(
140        default,
141        deserialize_with = "crate::de::opt_string",
142        skip_serializing_if = "Option::is_none"
143    )]
144    pub join_url: Option<String>,
145    #[serde(
146        default,
147        deserialize_with = "crate::de::opt_string",
148        skip_serializing_if = "Option::is_none"
149    )]
150    pub desktop_app_join_url: Option<String>,
151    #[serde(
152        default,
153        deserialize_with = "crate::de::opt_string",
154        skip_serializing_if = "Option::is_none"
155    )]
156    pub external_display_id: Option<String>,
157    #[serde(
158        default,
159        deserialize_with = "crate::de::opt_string",
160        skip_serializing_if = "Option::is_none"
161    )]
162    pub title: Option<String>,
163    #[serde(
164        default,
165        deserialize_with = "crate::de::vec",
166        skip_serializing_if = "Vec::is_empty"
167    )]
168    pub users: Vec<CallsAddResponseCallUsers>,
169}
170
171#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
172pub struct CallsAddResponseCallUsers {
173    #[serde(
174        default,
175        deserialize_with = "crate::de::opt_string",
176        skip_serializing_if = "Option::is_none"
177    )]
178    pub slack_id: Option<String>,
179    #[serde(
180        default,
181        deserialize_with = "crate::de::opt_string",
182        skip_serializing_if = "Option::is_none"
183    )]
184    pub external_id: Option<String>,
185    #[serde(
186        default,
187        deserialize_with = "crate::de::opt_string",
188        skip_serializing_if = "Option::is_none"
189    )]
190    pub display_name: Option<String>,
191    #[serde(
192        default,
193        deserialize_with = "crate::de::opt_string",
194        skip_serializing_if = "Option::is_none"
195    )]
196    pub avatar_url: Option<String>,
197}
198
199/// Arguments for the Slack Web API method [`calls.end`](https://docs.slack.dev/reference/methods/calls.end): Ends a Call.
200///
201/// Send it with [`SlackClient::calls_end`].
202#[doc(alias = "calls.end")]
203#[derive(Debug, Clone, PartialEq, Serialize)]
204#[non_exhaustive]
205pub struct CallsEndRequest {
206    /// `id` returned when registering the call using the [`calls.add`](https://docs.slack.dev/reference/methods/calls.add.md) method.
207    pub id: String,
208    /// Call duration in seconds
209    #[serde(skip_serializing_if = "Option::is_none")]
210    pub duration: Option<i64>,
211}
212
213impl CallsEndRequest {
214    pub fn new(id: impl Into<String>) -> Self {
215        Self {
216            id: id.into(),
217            duration: None,
218        }
219    }
220
221    pub fn duration(mut self, duration: i64) -> Self {
222        self.duration = Some(duration);
223        self
224    }
225}
226
227impl SlackApiMethod for CallsEndRequest {
228    const METHOD: &'static str = "calls.end";
229    type Response = CallsEndResponse;
230}
231
232/// Successful response of the Slack Web API method [`calls.end`](https://docs.slack.dev/reference/methods/calls.end).
233#[doc(alias = "calls.end")]
234#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
235pub struct CallsEndResponse {
236    #[serde(
237        default,
238        deserialize_with = "crate::de::opt_string",
239        skip_serializing_if = "Option::is_none"
240    )]
241    pub error: Option<String>,
242    #[serde(
243        default,
244        deserialize_with = "crate::de::opt_object",
245        skip_serializing_if = "Option::is_none"
246    )]
247    pub response_metadata: Option<ResponseMetadata>,
248    #[serde(
249        default,
250        deserialize_with = "crate::de::opt_string",
251        skip_serializing_if = "Option::is_none"
252    )]
253    pub warning: Option<String>,
254}
255
256/// Arguments for the Slack Web API method [`calls.info`](https://docs.slack.dev/reference/methods/calls.info): Returns information about a Call.
257///
258/// Send it with [`SlackClient::calls_info`].
259#[doc(alias = "calls.info")]
260#[derive(Debug, Clone, PartialEq, Serialize)]
261#[non_exhaustive]
262pub struct CallsInfoRequest {
263    /// `id` of the Call returned by the [`calls.add`](https://docs.slack.dev/reference/methods/calls.add.md) method.
264    pub id: String,
265}
266
267impl CallsInfoRequest {
268    pub fn new(id: impl Into<String>) -> Self {
269        Self { id: id.into() }
270    }
271}
272
273impl SlackApiMethod for CallsInfoRequest {
274    const METHOD: &'static str = "calls.info";
275    type Response = CallsInfoResponse;
276}
277
278/// Successful response of the Slack Web API method [`calls.info`](https://docs.slack.dev/reference/methods/calls.info).
279#[doc(alias = "calls.info")]
280#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
281pub struct CallsInfoResponse {
282    #[serde(
283        default,
284        deserialize_with = "crate::de::opt_object",
285        skip_serializing_if = "Option::is_none"
286    )]
287    pub call: Option<CallsInfoResponseCall>,
288    #[serde(
289        default,
290        deserialize_with = "crate::de::opt_object",
291        skip_serializing_if = "Option::is_none"
292    )]
293    pub response_metadata: Option<ResponseMetadata>,
294    #[serde(
295        default,
296        deserialize_with = "crate::de::opt_string",
297        skip_serializing_if = "Option::is_none"
298    )]
299    pub warning: Option<String>,
300}
301
302#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
303pub struct CallsInfoResponseCall {
304    #[serde(
305        default,
306        deserialize_with = "crate::de::opt_string",
307        skip_serializing_if = "Option::is_none"
308    )]
309    pub id: Option<String>,
310    #[serde(
311        default,
312        deserialize_with = "crate::de::opt_i64",
313        skip_serializing_if = "Option::is_none"
314    )]
315    pub date_start: Option<i64>,
316    #[serde(
317        default,
318        deserialize_with = "crate::de::opt_string",
319        skip_serializing_if = "Option::is_none"
320    )]
321    pub external_unique_id: Option<String>,
322    #[serde(
323        default,
324        deserialize_with = "crate::de::opt_string",
325        skip_serializing_if = "Option::is_none"
326    )]
327    pub join_url: Option<String>,
328    #[serde(
329        default,
330        deserialize_with = "crate::de::opt_string",
331        skip_serializing_if = "Option::is_none"
332    )]
333    pub desktop_app_join_url: Option<String>,
334    #[serde(
335        default,
336        deserialize_with = "crate::de::opt_string",
337        skip_serializing_if = "Option::is_none"
338    )]
339    pub external_display_id: Option<String>,
340    #[serde(
341        default,
342        deserialize_with = "crate::de::opt_string",
343        skip_serializing_if = "Option::is_none"
344    )]
345    pub title: Option<String>,
346    #[serde(
347        default,
348        deserialize_with = "crate::de::vec",
349        skip_serializing_if = "Vec::is_empty"
350    )]
351    pub users: Vec<CallsInfoResponseCallUsers>,
352}
353
354#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
355pub struct CallsInfoResponseCallUsers {
356    #[serde(
357        default,
358        deserialize_with = "crate::de::opt_string",
359        skip_serializing_if = "Option::is_none"
360    )]
361    pub slack_id: Option<String>,
362    #[serde(
363        default,
364        deserialize_with = "crate::de::opt_string",
365        skip_serializing_if = "Option::is_none"
366    )]
367    pub external_id: Option<String>,
368    #[serde(
369        default,
370        deserialize_with = "crate::de::opt_string",
371        skip_serializing_if = "Option::is_none"
372    )]
373    pub display_name: Option<String>,
374    #[serde(
375        default,
376        deserialize_with = "crate::de::opt_string",
377        skip_serializing_if = "Option::is_none"
378    )]
379    pub avatar_url: Option<String>,
380}
381
382/// Arguments for the Slack Web API method [`calls.participants.add`](https://docs.slack.dev/reference/methods/calls.participants.add): Registers new participants added to a Call.
383///
384/// Send it with [`SlackClient::calls_participants_add`].
385#[doc(alias = "calls.participants.add")]
386#[derive(Debug, Clone, PartialEq, Serialize)]
387#[non_exhaustive]
388pub struct CallsParticipantsAddRequest {
389    /// `id` returned by the [`calls.add`](https://docs.slack.dev/reference/methods/calls.add.md) method.
390    pub id: String,
391    /// The list of users to add as participants in the Call. [Read more on how to specify users here](https://docs.slack.dev/apis/web-api/using-the-calls-api.md#users).
392    #[serde(serialize_with = "crate::form::as_json")]
393    pub users: Vec<serde_json::Value>,
394}
395
396impl CallsParticipantsAddRequest {
397    pub fn new(id: impl Into<String>, users: Vec<serde_json::Value>) -> Self {
398        Self {
399            id: id.into(),
400            users,
401        }
402    }
403}
404
405impl SlackApiMethod for CallsParticipantsAddRequest {
406    const METHOD: &'static str = "calls.participants.add";
407    type Response = CallsParticipantsAddResponse;
408}
409
410/// Successful response of the Slack Web API method [`calls.participants.add`](https://docs.slack.dev/reference/methods/calls.participants.add).
411#[doc(alias = "calls.participants.add")]
412#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
413pub struct CallsParticipantsAddResponse {
414    #[serde(
415        default,
416        deserialize_with = "crate::de::opt_string",
417        skip_serializing_if = "Option::is_none"
418    )]
419    pub error: Option<String>,
420    #[serde(
421        default,
422        deserialize_with = "crate::de::opt_object",
423        skip_serializing_if = "Option::is_none"
424    )]
425    pub response_metadata: Option<ResponseMetadata>,
426    #[serde(
427        default,
428        deserialize_with = "crate::de::opt_string",
429        skip_serializing_if = "Option::is_none"
430    )]
431    pub warning: Option<String>,
432}
433
434/// Arguments for the Slack Web API method [`calls.participants.remove`](https://docs.slack.dev/reference/methods/calls.participants.remove): Registers participants removed from a Call.
435///
436/// Send it with [`SlackClient::calls_participants_remove`].
437#[doc(alias = "calls.participants.remove")]
438#[derive(Debug, Clone, PartialEq, Serialize)]
439#[non_exhaustive]
440pub struct CallsParticipantsRemoveRequest {
441    /// `id` returned by the [`calls.add`](https://docs.slack.dev/reference/methods/calls.add.md) method.
442    pub id: String,
443    /// The list of users to remove as participants in the Call. [Read more on how to specify users here](https://docs.slack.dev/apis/web-api/using-the-calls-api.md#users).
444    #[serde(serialize_with = "crate::form::as_json")]
445    pub users: Vec<serde_json::Value>,
446}
447
448impl CallsParticipantsRemoveRequest {
449    pub fn new(id: impl Into<String>, users: Vec<serde_json::Value>) -> Self {
450        Self {
451            id: id.into(),
452            users,
453        }
454    }
455}
456
457impl SlackApiMethod for CallsParticipantsRemoveRequest {
458    const METHOD: &'static str = "calls.participants.remove";
459    type Response = CallsParticipantsRemoveResponse;
460}
461
462/// Successful response of the Slack Web API method [`calls.participants.remove`](https://docs.slack.dev/reference/methods/calls.participants.remove).
463#[doc(alias = "calls.participants.remove")]
464#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
465pub struct CallsParticipantsRemoveResponse {
466    #[serde(
467        default,
468        deserialize_with = "crate::de::opt_string",
469        skip_serializing_if = "Option::is_none"
470    )]
471    pub error: Option<String>,
472    #[serde(
473        default,
474        deserialize_with = "crate::de::opt_object",
475        skip_serializing_if = "Option::is_none"
476    )]
477    pub response_metadata: Option<ResponseMetadata>,
478    #[serde(
479        default,
480        deserialize_with = "crate::de::opt_string",
481        skip_serializing_if = "Option::is_none"
482    )]
483    pub warning: Option<String>,
484}
485
486/// Arguments for the Slack Web API method [`calls.update`](https://docs.slack.dev/reference/methods/calls.update): Updates information about a Call.
487///
488/// Send it with [`SlackClient::calls_update`].
489#[doc(alias = "calls.update")]
490#[derive(Debug, Clone, PartialEq, Serialize)]
491#[non_exhaustive]
492pub struct CallsUpdateRequest {
493    /// `id` returned by the [`calls.add`](https://docs.slack.dev/reference/methods/calls.add.md) method.
494    pub id: String,
495    /// The name of the Call.
496    #[serde(skip_serializing_if = "Option::is_none")]
497    pub title: Option<String>,
498    /// The URL required for a client to join the Call.
499    #[serde(skip_serializing_if = "Option::is_none")]
500    pub join_url: Option<String>,
501    /// When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
502    #[serde(skip_serializing_if = "Option::is_none")]
503    pub desktop_app_join_url: Option<String>,
504}
505
506impl CallsUpdateRequest {
507    pub fn new(id: impl Into<String>) -> Self {
508        Self {
509            id: id.into(),
510            title: None,
511            join_url: None,
512            desktop_app_join_url: None,
513        }
514    }
515
516    pub fn title(mut self, title: impl Into<String>) -> Self {
517        self.title = Some(title.into());
518        self
519    }
520
521    pub fn join_url(mut self, join_url: impl Into<String>) -> Self {
522        self.join_url = Some(join_url.into());
523        self
524    }
525
526    pub fn desktop_app_join_url(mut self, desktop_app_join_url: impl Into<String>) -> Self {
527        self.desktop_app_join_url = Some(desktop_app_join_url.into());
528        self
529    }
530}
531
532impl SlackApiMethod for CallsUpdateRequest {
533    const METHOD: &'static str = "calls.update";
534    type Response = CallsUpdateResponse;
535}
536
537/// Successful response of the Slack Web API method [`calls.update`](https://docs.slack.dev/reference/methods/calls.update).
538#[doc(alias = "calls.update")]
539#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
540pub struct CallsUpdateResponse {
541    #[serde(
542        default,
543        deserialize_with = "crate::de::opt_object",
544        skip_serializing_if = "Option::is_none"
545    )]
546    pub call: Option<CallsUpdateResponseCall>,
547    #[serde(
548        default,
549        deserialize_with = "crate::de::opt_object",
550        skip_serializing_if = "Option::is_none"
551    )]
552    pub response_metadata: Option<ResponseMetadata>,
553    #[serde(
554        default,
555        deserialize_with = "crate::de::opt_string",
556        skip_serializing_if = "Option::is_none"
557    )]
558    pub warning: Option<String>,
559}
560
561#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
562pub struct CallsUpdateResponseCall {
563    #[serde(
564        default,
565        deserialize_with = "crate::de::opt_string",
566        skip_serializing_if = "Option::is_none"
567    )]
568    pub id: Option<String>,
569    #[serde(
570        default,
571        deserialize_with = "crate::de::opt_i64",
572        skip_serializing_if = "Option::is_none"
573    )]
574    pub date_start: Option<i64>,
575    #[serde(
576        default,
577        deserialize_with = "crate::de::opt_string",
578        skip_serializing_if = "Option::is_none"
579    )]
580    pub external_unique_id: Option<String>,
581    #[serde(
582        default,
583        deserialize_with = "crate::de::opt_string",
584        skip_serializing_if = "Option::is_none"
585    )]
586    pub join_url: Option<String>,
587    #[serde(
588        default,
589        deserialize_with = "crate::de::opt_string",
590        skip_serializing_if = "Option::is_none"
591    )]
592    pub desktop_app_join_url: Option<String>,
593    #[serde(
594        default,
595        deserialize_with = "crate::de::opt_string",
596        skip_serializing_if = "Option::is_none"
597    )]
598    pub external_display_id: Option<String>,
599    #[serde(
600        default,
601        deserialize_with = "crate::de::opt_string",
602        skip_serializing_if = "Option::is_none"
603    )]
604    pub title: Option<String>,
605    #[serde(
606        default,
607        deserialize_with = "crate::de::vec",
608        skip_serializing_if = "Vec::is_empty"
609    )]
610    pub users: Vec<CallsUpdateResponseCallUsers>,
611}
612
613#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
614pub struct CallsUpdateResponseCallUsers {
615    #[serde(
616        default,
617        deserialize_with = "crate::de::opt_string",
618        skip_serializing_if = "Option::is_none"
619    )]
620    pub slack_id: Option<String>,
621    #[serde(
622        default,
623        deserialize_with = "crate::de::opt_string",
624        skip_serializing_if = "Option::is_none"
625    )]
626    pub external_id: Option<String>,
627    #[serde(
628        default,
629        deserialize_with = "crate::de::opt_string",
630        skip_serializing_if = "Option::is_none"
631    )]
632    pub display_name: Option<String>,
633    #[serde(
634        default,
635        deserialize_with = "crate::de::opt_string",
636        skip_serializing_if = "Option::is_none"
637    )]
638    pub avatar_url: Option<String>,
639}
640
641impl SlackClient {
642    /// Calls the Slack Web API method [`calls.add`](https://docs.slack.dev/reference/methods/calls.add): Registers a new Call.
643    ///
644    /// Required scopes:
645    ///
646    /// - bot token: `calls:write`
647    /// - user token: `calls:write`
648    ///
649    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
650    ///
651    /// # Errors
652    ///
653    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
654    #[doc(alias = "calls.add")]
655    pub async fn calls_add(
656        &self,
657        request: &CallsAddRequest,
658    ) -> Result<CallsAddResponse, SlackError> {
659        self.call(request).await
660    }
661
662    /// Calls the Slack Web API method [`calls.end`](https://docs.slack.dev/reference/methods/calls.end): Ends a Call.
663    ///
664    /// Required scopes:
665    ///
666    /// - bot token: `calls:write`
667    /// - user token: `calls:write`
668    ///
669    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
670    ///
671    /// # Errors
672    ///
673    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
674    #[doc(alias = "calls.end")]
675    pub async fn calls_end(
676        &self,
677        request: &CallsEndRequest,
678    ) -> Result<CallsEndResponse, SlackError> {
679        self.call(request).await
680    }
681
682    /// Calls the Slack Web API method [`calls.info`](https://docs.slack.dev/reference/methods/calls.info): Returns information about a Call.
683    ///
684    /// Required scopes:
685    ///
686    /// - bot token: `calls:read`
687    /// - user token: `calls:read`
688    ///
689    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
690    ///
691    /// # Errors
692    ///
693    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
694    #[doc(alias = "calls.info")]
695    pub async fn calls_info(
696        &self,
697        request: &CallsInfoRequest,
698    ) -> Result<CallsInfoResponse, SlackError> {
699        self.call(request).await
700    }
701
702    /// Calls the Slack Web API method [`calls.participants.add`](https://docs.slack.dev/reference/methods/calls.participants.add): Registers new participants added to a Call.
703    ///
704    /// Required scopes:
705    ///
706    /// - bot token: `calls:write`
707    /// - user token: `calls:write`
708    ///
709    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
710    ///
711    /// # Errors
712    ///
713    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
714    #[doc(alias = "calls.participants.add")]
715    pub async fn calls_participants_add(
716        &self,
717        request: &CallsParticipantsAddRequest,
718    ) -> Result<CallsParticipantsAddResponse, SlackError> {
719        self.call(request).await
720    }
721
722    /// Calls the Slack Web API method [`calls.participants.remove`](https://docs.slack.dev/reference/methods/calls.participants.remove): Registers participants removed from a Call.
723    ///
724    /// Required scopes:
725    ///
726    /// - bot token: `calls:write`
727    /// - user token: `calls:write`
728    ///
729    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
730    ///
731    /// # Errors
732    ///
733    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
734    #[doc(alias = "calls.participants.remove")]
735    pub async fn calls_participants_remove(
736        &self,
737        request: &CallsParticipantsRemoveRequest,
738    ) -> Result<CallsParticipantsRemoveResponse, SlackError> {
739        self.call(request).await
740    }
741
742    /// Calls the Slack Web API method [`calls.update`](https://docs.slack.dev/reference/methods/calls.update): Updates information about a Call.
743    ///
744    /// Required scopes:
745    ///
746    /// - bot token: `calls:write`
747    /// - user token: `calls:write`
748    ///
749    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
750    ///
751    /// # Errors
752    ///
753    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
754    #[doc(alias = "calls.update")]
755    pub async fn calls_update(
756        &self,
757        request: &CallsUpdateRequest,
758    ) -> Result<CallsUpdateResponse, SlackError> {
759        self.call(request).await
760    }
761}