Skip to main content

slack_web_api/api/
workflows.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 [`workflows.featured.add`](https://docs.slack.dev/reference/methods/workflows.featured.add): Add featured workflows to a channel.
12///
13/// Send it with [`SlackClient::workflows_featured_add`].
14#[doc(alias = "workflows.featured.add")]
15#[derive(Debug, Clone, PartialEq, Serialize)]
16#[non_exhaustive]
17pub struct WorkflowsFeaturedAddRequest {
18    /// Channel to add featured workflow in.
19    pub channel_id: String,
20    /// Comma-separated array of trigger IDs to add; max 15
21    #[serde(serialize_with = "crate::form::as_json")]
22    pub trigger_ids: Vec<String>,
23}
24
25impl WorkflowsFeaturedAddRequest {
26    pub fn new(channel_id: impl Into<String>, trigger_ids: Vec<String>) -> Self {
27        Self {
28            channel_id: channel_id.into(),
29            trigger_ids,
30        }
31    }
32}
33
34impl SlackApiMethod for WorkflowsFeaturedAddRequest {
35    const METHOD: &'static str = "workflows.featured.add";
36    type Response = WorkflowsFeaturedAddResponse;
37}
38
39/// Successful response of the Slack Web API method [`workflows.featured.add`](https://docs.slack.dev/reference/methods/workflows.featured.add).
40#[doc(alias = "workflows.featured.add")]
41#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
42pub struct WorkflowsFeaturedAddResponse {
43    /// Fields returned by Slack. This method has no documented response example.
44    #[serde(flatten)]
45    pub extra: serde_json::Map<String, serde_json::Value>,
46    #[serde(
47        default,
48        deserialize_with = "crate::de::opt_object",
49        skip_serializing_if = "Option::is_none"
50    )]
51    pub response_metadata: Option<ResponseMetadata>,
52    #[serde(
53        default,
54        deserialize_with = "crate::de::opt_string",
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub warning: Option<String>,
58}
59
60/// Arguments for the Slack Web API method [`workflows.featured.list`](https://docs.slack.dev/reference/methods/workflows.featured.list): List the featured workflows for specified channels.
61///
62/// Send it with [`SlackClient::workflows_featured_list`].
63#[doc(alias = "workflows.featured.list")]
64#[derive(Debug, Clone, PartialEq, Serialize)]
65#[non_exhaustive]
66pub struct WorkflowsFeaturedListRequest {
67    /// Comma-separated array of channel IDs to list featured workflows for.
68    #[serde(serialize_with = "crate::form::as_json")]
69    pub channel_ids: Vec<String>,
70}
71
72impl WorkflowsFeaturedListRequest {
73    pub fn new(channel_ids: Vec<String>) -> Self {
74        Self { channel_ids }
75    }
76}
77
78impl SlackApiMethod for WorkflowsFeaturedListRequest {
79    const METHOD: &'static str = "workflows.featured.list";
80    type Response = WorkflowsFeaturedListResponse;
81}
82
83/// Successful response of the Slack Web API method [`workflows.featured.list`](https://docs.slack.dev/reference/methods/workflows.featured.list).
84#[doc(alias = "workflows.featured.list")]
85#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
86pub struct WorkflowsFeaturedListResponse {
87    #[serde(
88        default,
89        deserialize_with = "crate::de::vec",
90        skip_serializing_if = "Vec::is_empty"
91    )]
92    pub featured_workflows: Vec<WorkflowsFeaturedListResponseFeaturedWorkflows>,
93    #[serde(
94        default,
95        deserialize_with = "crate::de::opt_object",
96        skip_serializing_if = "Option::is_none"
97    )]
98    pub response_metadata: Option<ResponseMetadata>,
99    #[serde(
100        default,
101        deserialize_with = "crate::de::opt_string",
102        skip_serializing_if = "Option::is_none"
103    )]
104    pub warning: Option<String>,
105}
106
107#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
108pub struct WorkflowsFeaturedListResponseFeaturedWorkflows {
109    #[serde(
110        default,
111        deserialize_with = "crate::de::opt_string",
112        skip_serializing_if = "Option::is_none"
113    )]
114    pub channel_id: Option<String>,
115    #[serde(
116        default,
117        deserialize_with = "crate::de::vec",
118        skip_serializing_if = "Vec::is_empty"
119    )]
120    pub triggers: Vec<WorkflowsFeaturedListResponseFeaturedWorkflowsTriggers>,
121}
122
123#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
124pub struct WorkflowsFeaturedListResponseFeaturedWorkflowsTriggers {
125    #[serde(
126        default,
127        deserialize_with = "crate::de::opt_string",
128        skip_serializing_if = "Option::is_none"
129    )]
130    pub id: Option<String>,
131    #[serde(
132        default,
133        deserialize_with = "crate::de::opt_string",
134        skip_serializing_if = "Option::is_none"
135    )]
136    pub title: Option<String>,
137}
138
139/// Arguments for the Slack Web API method [`workflows.featured.remove`](https://docs.slack.dev/reference/methods/workflows.featured.remove): Remove featured workflows from a channel.
140///
141/// Send it with [`SlackClient::workflows_featured_remove`].
142#[doc(alias = "workflows.featured.remove")]
143#[derive(Debug, Clone, PartialEq, Serialize)]
144#[non_exhaustive]
145pub struct WorkflowsFeaturedRemoveRequest {
146    /// Channel to remove featured workflow from.
147    pub channel_id: String,
148    /// Comma-separated array of trigger IDs to remove; max 15
149    #[serde(serialize_with = "crate::form::as_json")]
150    pub trigger_ids: Vec<String>,
151}
152
153impl WorkflowsFeaturedRemoveRequest {
154    pub fn new(channel_id: impl Into<String>, trigger_ids: Vec<String>) -> Self {
155        Self {
156            channel_id: channel_id.into(),
157            trigger_ids,
158        }
159    }
160}
161
162impl SlackApiMethod for WorkflowsFeaturedRemoveRequest {
163    const METHOD: &'static str = "workflows.featured.remove";
164    type Response = WorkflowsFeaturedRemoveResponse;
165}
166
167/// Successful response of the Slack Web API method [`workflows.featured.remove`](https://docs.slack.dev/reference/methods/workflows.featured.remove).
168#[doc(alias = "workflows.featured.remove")]
169#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
170pub struct WorkflowsFeaturedRemoveResponse {
171    /// Fields returned by Slack. This method has no documented response example.
172    #[serde(flatten)]
173    pub extra: serde_json::Map<String, serde_json::Value>,
174    #[serde(
175        default,
176        deserialize_with = "crate::de::opt_object",
177        skip_serializing_if = "Option::is_none"
178    )]
179    pub response_metadata: Option<ResponseMetadata>,
180    #[serde(
181        default,
182        deserialize_with = "crate::de::opt_string",
183        skip_serializing_if = "Option::is_none"
184    )]
185    pub warning: Option<String>,
186}
187
188/// Arguments for the Slack Web API method [`workflows.featured.set`](https://docs.slack.dev/reference/methods/workflows.featured.set): Set featured workflows for a channel.
189///
190/// Send it with [`SlackClient::workflows_featured_set`].
191#[doc(alias = "workflows.featured.set")]
192#[derive(Debug, Clone, PartialEq, Serialize)]
193#[non_exhaustive]
194pub struct WorkflowsFeaturedSetRequest {
195    /// Channel to set featured workflows in.
196    pub channel_id: String,
197    /// Comma-separated array of trigger IDs that will replace any existing featured workflows in the channel; max 15
198    #[serde(serialize_with = "crate::form::as_json")]
199    pub trigger_ids: Vec<String>,
200}
201
202impl WorkflowsFeaturedSetRequest {
203    pub fn new(channel_id: impl Into<String>, trigger_ids: Vec<String>) -> Self {
204        Self {
205            channel_id: channel_id.into(),
206            trigger_ids,
207        }
208    }
209}
210
211impl SlackApiMethod for WorkflowsFeaturedSetRequest {
212    const METHOD: &'static str = "workflows.featured.set";
213    type Response = WorkflowsFeaturedSetResponse;
214}
215
216/// Successful response of the Slack Web API method [`workflows.featured.set`](https://docs.slack.dev/reference/methods/workflows.featured.set).
217#[doc(alias = "workflows.featured.set")]
218#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
219pub struct WorkflowsFeaturedSetResponse {
220    /// Fields returned by Slack. This method has no documented response example.
221    #[serde(flatten)]
222    pub extra: serde_json::Map<String, serde_json::Value>,
223    #[serde(
224        default,
225        deserialize_with = "crate::de::opt_object",
226        skip_serializing_if = "Option::is_none"
227    )]
228    pub response_metadata: Option<ResponseMetadata>,
229    #[serde(
230        default,
231        deserialize_with = "crate::de::opt_string",
232        skip_serializing_if = "Option::is_none"
233    )]
234    pub warning: Option<String>,
235}
236
237/// Arguments for the Slack Web API method [`workflows.triggers.permissions.add`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.add): Allows users to run a trigger that has its permission type set to named_entities
238///
239/// Send it with [`SlackClient::workflows_triggers_permissions_add`].
240#[doc(alias = "workflows.triggers.permissions.add")]
241#[derive(Debug, Clone, PartialEq, Serialize)]
242#[non_exhaustive]
243pub struct WorkflowsTriggersPermissionsAddRequest {
244    /// Encoded ID of the trigger
245    pub trigger_id: String,
246    /// List of encoded user IDs
247    #[serde(skip_serializing_if = "Option::is_none")]
248    pub user_ids: Option<Vec<String>>,
249    /// List of encoded channel IDs
250    #[serde(skip_serializing_if = "Option::is_none")]
251    pub channel_ids: Option<Vec<String>>,
252    /// List of encoded workspace IDs
253    #[serde(skip_serializing_if = "Option::is_none")]
254    pub team_ids: Option<Vec<String>>,
255    /// List of encoded organization IDs
256    #[serde(skip_serializing_if = "Option::is_none")]
257    pub org_ids: Option<Vec<String>>,
258}
259
260impl WorkflowsTriggersPermissionsAddRequest {
261    pub fn new(trigger_id: impl Into<String>) -> Self {
262        Self {
263            trigger_id: trigger_id.into(),
264            user_ids: None,
265            channel_ids: None,
266            team_ids: None,
267            org_ids: None,
268        }
269    }
270
271    pub fn user_ids(mut self, user_ids: Vec<String>) -> Self {
272        self.user_ids = Some(user_ids);
273        self
274    }
275
276    pub fn channel_ids(mut self, channel_ids: Vec<String>) -> Self {
277        self.channel_ids = Some(channel_ids);
278        self
279    }
280
281    pub fn team_ids(mut self, team_ids: Vec<String>) -> Self {
282        self.team_ids = Some(team_ids);
283        self
284    }
285
286    pub fn org_ids(mut self, org_ids: Vec<String>) -> Self {
287        self.org_ids = Some(org_ids);
288        self
289    }
290}
291
292impl SlackApiMethod for WorkflowsTriggersPermissionsAddRequest {
293    const METHOD: &'static str = "workflows.triggers.permissions.add";
294    type Response = WorkflowsTriggersPermissionsAddResponse;
295}
296
297/// Successful response of the Slack Web API method [`workflows.triggers.permissions.add`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.add).
298#[doc(alias = "workflows.triggers.permissions.add")]
299#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
300pub struct WorkflowsTriggersPermissionsAddResponse {
301    #[serde(
302        default,
303        deserialize_with = "crate::de::opt_string",
304        skip_serializing_if = "Option::is_none"
305    )]
306    pub permission_type: Option<String>,
307    #[serde(
308        default,
309        deserialize_with = "crate::de::vec",
310        skip_serializing_if = "Vec::is_empty"
311    )]
312    pub user_ids: Vec<String>,
313    #[serde(
314        default,
315        deserialize_with = "crate::de::vec",
316        skip_serializing_if = "Vec::is_empty"
317    )]
318    pub channel_ids: Vec<String>,
319    #[serde(
320        default,
321        deserialize_with = "crate::de::opt_object",
322        skip_serializing_if = "Option::is_none"
323    )]
324    pub response_metadata: Option<ResponseMetadata>,
325    #[serde(
326        default,
327        deserialize_with = "crate::de::opt_string",
328        skip_serializing_if = "Option::is_none"
329    )]
330    pub warning: Option<String>,
331}
332
333/// Arguments for the Slack Web API method [`workflows.triggers.permissions.list`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.list): Returns the permission type of a trigger and if applicable, includes the entities that have been granted access
334///
335/// Send it with [`SlackClient::workflows_triggers_permissions_list`].
336#[doc(alias = "workflows.triggers.permissions.list")]
337#[derive(Debug, Clone, PartialEq, Serialize)]
338#[non_exhaustive]
339pub struct WorkflowsTriggersPermissionsListRequest {
340    /// Encoded ID of the trigger
341    pub trigger_id: String,
342}
343
344impl WorkflowsTriggersPermissionsListRequest {
345    pub fn new(trigger_id: impl Into<String>) -> Self {
346        Self {
347            trigger_id: trigger_id.into(),
348        }
349    }
350}
351
352impl SlackApiMethod for WorkflowsTriggersPermissionsListRequest {
353    const METHOD: &'static str = "workflows.triggers.permissions.list";
354    type Response = WorkflowsTriggersPermissionsListResponse;
355}
356
357/// Successful response of the Slack Web API method [`workflows.triggers.permissions.list`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.list).
358#[doc(alias = "workflows.triggers.permissions.list")]
359#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
360pub struct WorkflowsTriggersPermissionsListResponse {
361    #[serde(
362        default,
363        deserialize_with = "crate::de::opt_string",
364        skip_serializing_if = "Option::is_none"
365    )]
366    pub permission_type: Option<String>,
367    #[serde(
368        default,
369        deserialize_with = "crate::de::vec",
370        skip_serializing_if = "Vec::is_empty"
371    )]
372    pub user_ids: Vec<String>,
373    #[serde(
374        default,
375        deserialize_with = "crate::de::opt_object",
376        skip_serializing_if = "Option::is_none"
377    )]
378    pub response_metadata: Option<ResponseMetadata>,
379    #[serde(
380        default,
381        deserialize_with = "crate::de::opt_string",
382        skip_serializing_if = "Option::is_none"
383    )]
384    pub warning: Option<String>,
385}
386
387/// Arguments for the Slack Web API method [`workflows.triggers.permissions.remove`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.remove): Revoke an entity's access to a trigger that has its permission type set to named_entities
388///
389/// Send it with [`SlackClient::workflows_triggers_permissions_remove`].
390#[doc(alias = "workflows.triggers.permissions.remove")]
391#[derive(Debug, Clone, PartialEq, Serialize)]
392#[non_exhaustive]
393pub struct WorkflowsTriggersPermissionsRemoveRequest {
394    /// Encoded ID of the trigger
395    pub trigger_id: String,
396    /// List of encoded user IDs
397    #[serde(skip_serializing_if = "Option::is_none")]
398    pub user_ids: Option<Vec<String>>,
399    /// List of encoded channel IDs
400    #[serde(skip_serializing_if = "Option::is_none")]
401    pub channel_ids: Option<Vec<String>>,
402    /// List of encoded workspace IDs
403    #[serde(skip_serializing_if = "Option::is_none")]
404    pub team_ids: Option<Vec<String>>,
405    /// List of encoded organization IDs
406    #[serde(skip_serializing_if = "Option::is_none")]
407    pub org_ids: Option<Vec<String>>,
408}
409
410impl WorkflowsTriggersPermissionsRemoveRequest {
411    pub fn new(trigger_id: impl Into<String>) -> Self {
412        Self {
413            trigger_id: trigger_id.into(),
414            user_ids: None,
415            channel_ids: None,
416            team_ids: None,
417            org_ids: None,
418        }
419    }
420
421    pub fn user_ids(mut self, user_ids: Vec<String>) -> Self {
422        self.user_ids = Some(user_ids);
423        self
424    }
425
426    pub fn channel_ids(mut self, channel_ids: Vec<String>) -> Self {
427        self.channel_ids = Some(channel_ids);
428        self
429    }
430
431    pub fn team_ids(mut self, team_ids: Vec<String>) -> Self {
432        self.team_ids = Some(team_ids);
433        self
434    }
435
436    pub fn org_ids(mut self, org_ids: Vec<String>) -> Self {
437        self.org_ids = Some(org_ids);
438        self
439    }
440}
441
442impl SlackApiMethod for WorkflowsTriggersPermissionsRemoveRequest {
443    const METHOD: &'static str = "workflows.triggers.permissions.remove";
444    type Response = WorkflowsTriggersPermissionsRemoveResponse;
445}
446
447/// Successful response of the Slack Web API method [`workflows.triggers.permissions.remove`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.remove).
448#[doc(alias = "workflows.triggers.permissions.remove")]
449#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
450pub struct WorkflowsTriggersPermissionsRemoveResponse {
451    #[serde(
452        default,
453        deserialize_with = "crate::de::opt_string",
454        skip_serializing_if = "Option::is_none"
455    )]
456    pub permission_type: Option<String>,
457    #[serde(
458        default,
459        deserialize_with = "crate::de::vec",
460        skip_serializing_if = "Vec::is_empty"
461    )]
462    pub user_ids: Vec<String>,
463    #[serde(
464        default,
465        deserialize_with = "crate::de::vec",
466        skip_serializing_if = "Vec::is_empty"
467    )]
468    pub channel_ids: Vec<String>,
469    #[serde(
470        default,
471        deserialize_with = "crate::de::opt_object",
472        skip_serializing_if = "Option::is_none"
473    )]
474    pub response_metadata: Option<ResponseMetadata>,
475    #[serde(
476        default,
477        deserialize_with = "crate::de::opt_string",
478        skip_serializing_if = "Option::is_none"
479    )]
480    pub warning: Option<String>,
481}
482
483/// Arguments for the Slack Web API method [`workflows.triggers.permissions.set`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.set): Set the permission type for who can run a trigger
484///
485/// Send it with [`SlackClient::workflows_triggers_permissions_set`].
486#[doc(alias = "workflows.triggers.permissions.set")]
487#[derive(Debug, Clone, PartialEq, Serialize)]
488#[non_exhaustive]
489pub struct WorkflowsTriggersPermissionsSetRequest {
490    /// Encoded ID of the trigger
491    pub trigger_id: String,
492    /// The type of permission that defines who can run a trigger
493    pub permission_type: String,
494    /// List of encoded user IDs
495    #[serde(skip_serializing_if = "Option::is_none")]
496    pub user_ids: Option<Vec<String>>,
497    /// List of encoded channel IDs
498    #[serde(skip_serializing_if = "Option::is_none")]
499    pub channel_ids: Option<Vec<String>>,
500    /// List of encoded workspace IDs
501    #[serde(skip_serializing_if = "Option::is_none")]
502    pub team_ids: Option<Vec<String>>,
503    /// List of encoded organization IDs
504    #[serde(skip_serializing_if = "Option::is_none")]
505    pub org_ids: Option<Vec<String>>,
506}
507
508impl WorkflowsTriggersPermissionsSetRequest {
509    pub fn new(trigger_id: impl Into<String>, permission_type: impl Into<String>) -> Self {
510        Self {
511            trigger_id: trigger_id.into(),
512            permission_type: permission_type.into(),
513            user_ids: None,
514            channel_ids: None,
515            team_ids: None,
516            org_ids: None,
517        }
518    }
519
520    pub fn user_ids(mut self, user_ids: Vec<String>) -> Self {
521        self.user_ids = Some(user_ids);
522        self
523    }
524
525    pub fn channel_ids(mut self, channel_ids: Vec<String>) -> Self {
526        self.channel_ids = Some(channel_ids);
527        self
528    }
529
530    pub fn team_ids(mut self, team_ids: Vec<String>) -> Self {
531        self.team_ids = Some(team_ids);
532        self
533    }
534
535    pub fn org_ids(mut self, org_ids: Vec<String>) -> Self {
536        self.org_ids = Some(org_ids);
537        self
538    }
539}
540
541impl SlackApiMethod for WorkflowsTriggersPermissionsSetRequest {
542    const METHOD: &'static str = "workflows.triggers.permissions.set";
543    type Response = WorkflowsTriggersPermissionsSetResponse;
544}
545
546/// Successful response of the Slack Web API method [`workflows.triggers.permissions.set`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.set).
547#[doc(alias = "workflows.triggers.permissions.set")]
548#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
549pub struct WorkflowsTriggersPermissionsSetResponse {
550    #[serde(
551        default,
552        deserialize_with = "crate::de::opt_string",
553        skip_serializing_if = "Option::is_none"
554    )]
555    pub permission_type: Option<String>,
556    #[serde(
557        default,
558        deserialize_with = "crate::de::vec",
559        skip_serializing_if = "Vec::is_empty"
560    )]
561    pub user_ids: Vec<String>,
562    #[serde(
563        default,
564        deserialize_with = "crate::de::opt_object",
565        skip_serializing_if = "Option::is_none"
566    )]
567    pub response_metadata: Option<ResponseMetadata>,
568    #[serde(
569        default,
570        deserialize_with = "crate::de::opt_string",
571        skip_serializing_if = "Option::is_none"
572    )]
573    pub warning: Option<String>,
574}
575
576impl SlackClient {
577    /// Calls the Slack Web API method [`workflows.featured.add`](https://docs.slack.dev/reference/methods/workflows.featured.add): Add featured workflows to a channel.
578    ///
579    /// Required scopes:
580    ///
581    /// - bot token: `bookmarks:write`
582    /// - user token: `bookmarks:write`
583    ///
584    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
585    ///
586    /// # Errors
587    ///
588    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
589    #[doc(alias = "workflows.featured.add")]
590    pub async fn workflows_featured_add(
591        &self,
592        request: &WorkflowsFeaturedAddRequest,
593    ) -> Result<WorkflowsFeaturedAddResponse, SlackError> {
594        self.call(request).await
595    }
596
597    /// Calls the Slack Web API method [`workflows.featured.list`](https://docs.slack.dev/reference/methods/workflows.featured.list): List the featured workflows for specified channels.
598    ///
599    /// Required scopes:
600    ///
601    /// - bot token: `bookmarks:read`
602    /// - user token: `bookmarks:read`
603    ///
604    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
605    ///
606    /// # Errors
607    ///
608    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
609    #[doc(alias = "workflows.featured.list")]
610    pub async fn workflows_featured_list(
611        &self,
612        request: &WorkflowsFeaturedListRequest,
613    ) -> Result<WorkflowsFeaturedListResponse, SlackError> {
614        self.call(request).await
615    }
616
617    /// Calls the Slack Web API method [`workflows.featured.remove`](https://docs.slack.dev/reference/methods/workflows.featured.remove): Remove featured workflows from a channel.
618    ///
619    /// Required scopes:
620    ///
621    /// - bot token: `bookmarks:write`
622    /// - user token: `bookmarks:write`
623    ///
624    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
625    ///
626    /// # Errors
627    ///
628    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
629    #[doc(alias = "workflows.featured.remove")]
630    pub async fn workflows_featured_remove(
631        &self,
632        request: &WorkflowsFeaturedRemoveRequest,
633    ) -> Result<WorkflowsFeaturedRemoveResponse, SlackError> {
634        self.call(request).await
635    }
636
637    /// Calls the Slack Web API method [`workflows.featured.set`](https://docs.slack.dev/reference/methods/workflows.featured.set): Set featured workflows for a channel.
638    ///
639    /// Required scopes:
640    ///
641    /// - bot token: `bookmarks:write`
642    /// - user token: `bookmarks:write`
643    ///
644    /// Rate limit: Tier 2 (<https://docs.slack.dev/apis/web-api/rate-limits>).
645    ///
646    /// # Errors
647    ///
648    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
649    #[doc(alias = "workflows.featured.set")]
650    pub async fn workflows_featured_set(
651        &self,
652        request: &WorkflowsFeaturedSetRequest,
653    ) -> Result<WorkflowsFeaturedSetResponse, SlackError> {
654        self.call(request).await
655    }
656
657    /// Calls the Slack Web API method [`workflows.triggers.permissions.add`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.add): Allows users to run a trigger that has its permission type set to named_entities
658    ///
659    /// Required scopes:
660    ///
661    /// - bot token: `triggers:write`
662    ///
663    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
664    ///
665    /// # Errors
666    ///
667    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
668    #[doc(alias = "workflows.triggers.permissions.add")]
669    pub async fn workflows_triggers_permissions_add(
670        &self,
671        request: &WorkflowsTriggersPermissionsAddRequest,
672    ) -> Result<WorkflowsTriggersPermissionsAddResponse, SlackError> {
673        self.call(request).await
674    }
675
676    /// Calls the Slack Web API method [`workflows.triggers.permissions.list`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.list): Returns the permission type of a trigger and if applicable, includes the entities that have been granted access
677    ///
678    /// Required scopes:
679    ///
680    /// - bot token: `triggers:read`
681    ///
682    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
683    ///
684    /// # Errors
685    ///
686    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
687    #[doc(alias = "workflows.triggers.permissions.list")]
688    pub async fn workflows_triggers_permissions_list(
689        &self,
690        request: &WorkflowsTriggersPermissionsListRequest,
691    ) -> Result<WorkflowsTriggersPermissionsListResponse, SlackError> {
692        self.call(request).await
693    }
694
695    /// Calls the Slack Web API method [`workflows.triggers.permissions.remove`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.remove): Revoke an entity's access to a trigger that has its permission type set to named_entities
696    ///
697    /// Required scopes:
698    ///
699    /// - bot token: `triggers:write`
700    ///
701    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
702    ///
703    /// # Errors
704    ///
705    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
706    #[doc(alias = "workflows.triggers.permissions.remove")]
707    pub async fn workflows_triggers_permissions_remove(
708        &self,
709        request: &WorkflowsTriggersPermissionsRemoveRequest,
710    ) -> Result<WorkflowsTriggersPermissionsRemoveResponse, SlackError> {
711        self.call(request).await
712    }
713
714    /// Calls the Slack Web API method [`workflows.triggers.permissions.set`](https://docs.slack.dev/reference/methods/workflows.triggers.permissions.set): Set the permission type for who can run a trigger
715    ///
716    /// Required scopes:
717    ///
718    /// - bot token: `triggers:write`
719    ///
720    /// Rate limit: Tier 3 (<https://docs.slack.dev/apis/web-api/rate-limits>).
721    ///
722    /// # Errors
723    ///
724    /// Returns [`SlackError::Api`] when Slack answers `"ok": false`; see [`SlackClient::call`] for the other cases.
725    #[doc(alias = "workflows.triggers.permissions.set")]
726    pub async fn workflows_triggers_permissions_set(
727        &self,
728        request: &WorkflowsTriggersPermissionsSetRequest,
729    ) -> Result<WorkflowsTriggersPermissionsSetResponse, SlackError> {
730        self.call(request).await
731    }
732}