1#![allow(unused_imports)]
4
5use crate::objects::*;
6use crate::{
7 CursorPaginated, NextCursor, ResponseMetadata, SlackApiMethod, SlackClient, SlackError,
8};
9use serde::{Deserialize, Serialize};
10
11#[doc(alias = "conversations.acceptSharedInvite")]
15#[derive(Debug, Clone, PartialEq, Serialize)]
16#[non_exhaustive]
17pub struct ConversationsAcceptSharedInviteRequest {
18 pub channel_name: String,
20 #[serde(skip_serializing_if = "Option::is_none")]
22 pub is_private: Option<bool>,
23 #[serde(skip_serializing_if = "Option::is_none")]
25 pub free_trial_accepted: Option<bool>,
26 #[serde(skip_serializing_if = "Option::is_none")]
28 pub invite_id: Option<String>,
29 #[serde(skip_serializing_if = "Option::is_none")]
31 pub channel_id: Option<String>,
32 #[serde(skip_serializing_if = "Option::is_none")]
34 pub team_id: Option<String>,
35}
36
37impl ConversationsAcceptSharedInviteRequest {
38 pub fn new(channel_name: impl Into<String>) -> Self {
39 Self {
40 channel_name: channel_name.into(),
41 is_private: None,
42 free_trial_accepted: None,
43 invite_id: None,
44 channel_id: None,
45 team_id: None,
46 }
47 }
48
49 pub fn is_private(mut self, is_private: bool) -> Self {
50 self.is_private = Some(is_private);
51 self
52 }
53
54 pub fn free_trial_accepted(mut self, free_trial_accepted: bool) -> Self {
55 self.free_trial_accepted = Some(free_trial_accepted);
56 self
57 }
58
59 pub fn invite_id(mut self, invite_id: impl Into<String>) -> Self {
60 self.invite_id = Some(invite_id.into());
61 self
62 }
63
64 pub fn channel_id(mut self, channel_id: impl Into<String>) -> Self {
65 self.channel_id = Some(channel_id.into());
66 self
67 }
68
69 pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
70 self.team_id = Some(team_id.into());
71 self
72 }
73}
74
75impl SlackApiMethod for ConversationsAcceptSharedInviteRequest {
76 const METHOD: &'static str = "conversations.acceptSharedInvite";
77 type Response = ConversationsAcceptSharedInviteResponse;
78}
79
80#[doc(alias = "conversations.acceptSharedInvite")]
82#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
83pub struct ConversationsAcceptSharedInviteResponse {
84 #[serde(
85 default,
86 deserialize_with = "crate::de::opt_bool",
87 skip_serializing_if = "Option::is_none"
88 )]
89 pub implicit_approval: Option<bool>,
90 #[serde(
91 default,
92 deserialize_with = "crate::de::opt_string",
93 skip_serializing_if = "Option::is_none"
94 )]
95 pub channel_id: Option<String>,
96 #[serde(
97 default,
98 deserialize_with = "crate::de::opt_string",
99 skip_serializing_if = "Option::is_none"
100 )]
101 pub invite_id: Option<String>,
102 #[serde(
103 default,
104 deserialize_with = "crate::de::opt_object",
105 skip_serializing_if = "Option::is_none"
106 )]
107 pub response_metadata: Option<ResponseMetadata>,
108 #[serde(
109 default,
110 deserialize_with = "crate::de::opt_string",
111 skip_serializing_if = "Option::is_none"
112 )]
113 pub warning: Option<String>,
114}
115
116#[doc(alias = "conversations.approveSharedInvite")]
120#[derive(Debug, Clone, PartialEq, Serialize)]
121#[non_exhaustive]
122pub struct ConversationsApproveSharedInviteRequest {
123 pub invite_id: String,
125 #[serde(skip_serializing_if = "Option::is_none")]
127 pub target_team: Option<String>,
128}
129
130impl ConversationsApproveSharedInviteRequest {
131 pub fn new(invite_id: impl Into<String>) -> Self {
132 Self {
133 invite_id: invite_id.into(),
134 target_team: None,
135 }
136 }
137
138 pub fn target_team(mut self, target_team: impl Into<String>) -> Self {
139 self.target_team = Some(target_team.into());
140 self
141 }
142}
143
144impl SlackApiMethod for ConversationsApproveSharedInviteRequest {
145 const METHOD: &'static str = "conversations.approveSharedInvite";
146 type Response = ConversationsApproveSharedInviteResponse;
147}
148
149#[doc(alias = "conversations.approveSharedInvite")]
151#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
152pub struct ConversationsApproveSharedInviteResponse {
153 #[serde(flatten)]
155 pub extra: serde_json::Map<String, serde_json::Value>,
156 #[serde(
157 default,
158 deserialize_with = "crate::de::opt_object",
159 skip_serializing_if = "Option::is_none"
160 )]
161 pub response_metadata: Option<ResponseMetadata>,
162 #[serde(
163 default,
164 deserialize_with = "crate::de::opt_string",
165 skip_serializing_if = "Option::is_none"
166 )]
167 pub warning: Option<String>,
168}
169
170#[doc(alias = "conversations.archive")]
174#[derive(Debug, Clone, PartialEq, Serialize)]
175#[non_exhaustive]
176pub struct ConversationsArchiveRequest {
177 pub channel: String,
179}
180
181impl ConversationsArchiveRequest {
182 pub fn new(channel: impl Into<String>) -> Self {
183 Self {
184 channel: channel.into(),
185 }
186 }
187}
188
189impl SlackApiMethod for ConversationsArchiveRequest {
190 const METHOD: &'static str = "conversations.archive";
191 type Response = ConversationsArchiveResponse;
192}
193
194#[doc(alias = "conversations.archive")]
196#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
197pub struct ConversationsArchiveResponse {
198 #[serde(flatten)]
200 pub extra: serde_json::Map<String, serde_json::Value>,
201 #[serde(
202 default,
203 deserialize_with = "crate::de::opt_object",
204 skip_serializing_if = "Option::is_none"
205 )]
206 pub response_metadata: Option<ResponseMetadata>,
207 #[serde(
208 default,
209 deserialize_with = "crate::de::opt_string",
210 skip_serializing_if = "Option::is_none"
211 )]
212 pub warning: Option<String>,
213}
214
215#[doc(alias = "conversations.canvases.create")]
219#[derive(Debug, Clone, PartialEq, Serialize)]
220#[non_exhaustive]
221pub struct ConversationsCanvasesCreateRequest {
222 pub channel_id: String,
224 #[serde(skip_serializing_if = "Option::is_none")]
226 pub document_content: Option<String>,
227 #[serde(skip_serializing_if = "Option::is_none")]
229 pub title: Option<String>,
230}
231
232impl ConversationsCanvasesCreateRequest {
233 pub fn new(channel_id: impl Into<String>) -> Self {
234 Self {
235 channel_id: channel_id.into(),
236 document_content: None,
237 title: None,
238 }
239 }
240
241 pub fn document_content(mut self, document_content: impl Into<String>) -> Self {
242 self.document_content = Some(document_content.into());
243 self
244 }
245
246 pub fn title(mut self, title: impl Into<String>) -> Self {
247 self.title = Some(title.into());
248 self
249 }
250}
251
252impl SlackApiMethod for ConversationsCanvasesCreateRequest {
253 const METHOD: &'static str = "conversations.canvases.create";
254 type Response = ConversationsCanvasesCreateResponse;
255}
256
257#[doc(alias = "conversations.canvases.create")]
259#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
260pub struct ConversationsCanvasesCreateResponse {
261 #[serde(
262 default,
263 deserialize_with = "crate::de::opt_string",
264 skip_serializing_if = "Option::is_none"
265 )]
266 pub canvas_id: Option<String>,
267 #[serde(
268 default,
269 deserialize_with = "crate::de::opt_object",
270 skip_serializing_if = "Option::is_none"
271 )]
272 pub response_metadata: Option<ResponseMetadata>,
273 #[serde(
274 default,
275 deserialize_with = "crate::de::opt_string",
276 skip_serializing_if = "Option::is_none"
277 )]
278 pub warning: Option<String>,
279}
280
281#[doc(alias = "conversations.close")]
285#[derive(Debug, Clone, PartialEq, Serialize)]
286#[non_exhaustive]
287pub struct ConversationsCloseRequest {
288 pub channel: String,
290}
291
292impl ConversationsCloseRequest {
293 pub fn new(channel: impl Into<String>) -> Self {
294 Self {
295 channel: channel.into(),
296 }
297 }
298}
299
300impl SlackApiMethod for ConversationsCloseRequest {
301 const METHOD: &'static str = "conversations.close";
302 type Response = ConversationsCloseResponse;
303}
304
305#[doc(alias = "conversations.close")]
307#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
308pub struct ConversationsCloseResponse {
309 #[serde(
310 default,
311 deserialize_with = "crate::de::opt_bool",
312 skip_serializing_if = "Option::is_none"
313 )]
314 pub no_op: Option<bool>,
315 #[serde(
316 default,
317 deserialize_with = "crate::de::opt_bool",
318 skip_serializing_if = "Option::is_none"
319 )]
320 pub already_closed: Option<bool>,
321 #[serde(
322 default,
323 deserialize_with = "crate::de::opt_object",
324 skip_serializing_if = "Option::is_none"
325 )]
326 pub response_metadata: Option<ResponseMetadata>,
327 #[serde(
328 default,
329 deserialize_with = "crate::de::opt_string",
330 skip_serializing_if = "Option::is_none"
331 )]
332 pub warning: Option<String>,
333}
334
335#[doc(alias = "conversations.create")]
339#[derive(Debug, Clone, PartialEq, Serialize)]
340#[non_exhaustive]
341pub struct ConversationsCreateRequest {
342 pub name: String,
344 #[serde(skip_serializing_if = "Option::is_none")]
346 pub is_private: Option<bool>,
347 #[serde(skip_serializing_if = "Option::is_none")]
349 pub team_id: Option<String>,
350}
351
352impl ConversationsCreateRequest {
353 pub fn new(name: impl Into<String>) -> Self {
354 Self {
355 name: name.into(),
356 is_private: None,
357 team_id: None,
358 }
359 }
360
361 pub fn is_private(mut self, is_private: bool) -> Self {
362 self.is_private = Some(is_private);
363 self
364 }
365
366 pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
367 self.team_id = Some(team_id.into());
368 self
369 }
370}
371
372impl SlackApiMethod for ConversationsCreateRequest {
373 const METHOD: &'static str = "conversations.create";
374 type Response = ConversationsCreateResponse;
375}
376
377#[doc(alias = "conversations.create")]
379#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
380pub struct ConversationsCreateResponse {
381 #[serde(
382 default,
383 deserialize_with = "crate::de::opt_object",
384 skip_serializing_if = "Option::is_none"
385 )]
386 pub channel: Option<Conversation>,
387 #[serde(
388 default,
389 deserialize_with = "crate::de::opt_object",
390 skip_serializing_if = "Option::is_none"
391 )]
392 pub response_metadata: Option<ResponseMetadata>,
393 #[serde(
394 default,
395 deserialize_with = "crate::de::opt_string",
396 skip_serializing_if = "Option::is_none"
397 )]
398 pub warning: Option<String>,
399}
400
401#[doc(alias = "conversations.declineSharedInvite")]
405#[derive(Debug, Clone, PartialEq, Serialize)]
406#[non_exhaustive]
407pub struct ConversationsDeclineSharedInviteRequest {
408 pub invite_id: String,
410 #[serde(skip_serializing_if = "Option::is_none")]
412 pub target_team: Option<String>,
413}
414
415impl ConversationsDeclineSharedInviteRequest {
416 pub fn new(invite_id: impl Into<String>) -> Self {
417 Self {
418 invite_id: invite_id.into(),
419 target_team: None,
420 }
421 }
422
423 pub fn target_team(mut self, target_team: impl Into<String>) -> Self {
424 self.target_team = Some(target_team.into());
425 self
426 }
427}
428
429impl SlackApiMethod for ConversationsDeclineSharedInviteRequest {
430 const METHOD: &'static str = "conversations.declineSharedInvite";
431 type Response = ConversationsDeclineSharedInviteResponse;
432}
433
434#[doc(alias = "conversations.declineSharedInvite")]
436#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
437pub struct ConversationsDeclineSharedInviteResponse {
438 #[serde(flatten)]
440 pub extra: serde_json::Map<String, serde_json::Value>,
441 #[serde(
442 default,
443 deserialize_with = "crate::de::opt_object",
444 skip_serializing_if = "Option::is_none"
445 )]
446 pub response_metadata: Option<ResponseMetadata>,
447 #[serde(
448 default,
449 deserialize_with = "crate::de::opt_string",
450 skip_serializing_if = "Option::is_none"
451 )]
452 pub warning: Option<String>,
453}
454
455#[doc(alias = "conversations.externalInvitePermissions.set")]
459#[derive(Debug, Clone, PartialEq, Serialize)]
460#[non_exhaustive]
461pub struct ConversationsExternalInvitePermissionsSetRequest {
462 pub channel: String,
464 pub target_team: String,
466 pub action: String,
468}
469
470impl ConversationsExternalInvitePermissionsSetRequest {
471 pub fn new(
472 channel: impl Into<String>,
473 target_team: impl Into<String>,
474 action: impl Into<String>,
475 ) -> Self {
476 Self {
477 channel: channel.into(),
478 target_team: target_team.into(),
479 action: action.into(),
480 }
481 }
482}
483
484impl SlackApiMethod for ConversationsExternalInvitePermissionsSetRequest {
485 const METHOD: &'static str = "conversations.externalInvitePermissions.set";
486 type Response = ConversationsExternalInvitePermissionsSetResponse;
487}
488
489#[doc(alias = "conversations.externalInvitePermissions.set")]
491#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
492pub struct ConversationsExternalInvitePermissionsSetResponse {
493 #[serde(flatten)]
495 pub extra: serde_json::Map<String, serde_json::Value>,
496 #[serde(
497 default,
498 deserialize_with = "crate::de::opt_object",
499 skip_serializing_if = "Option::is_none"
500 )]
501 pub response_metadata: Option<ResponseMetadata>,
502 #[serde(
503 default,
504 deserialize_with = "crate::de::opt_string",
505 skip_serializing_if = "Option::is_none"
506 )]
507 pub warning: Option<String>,
508}
509
510#[doc(alias = "conversations.history")]
514#[derive(Debug, Clone, PartialEq, Serialize)]
515#[non_exhaustive]
516pub struct ConversationsHistoryRequest {
517 pub channel: String,
519 #[serde(skip_serializing_if = "Option::is_none")]
521 pub cursor: Option<String>,
522 #[serde(skip_serializing_if = "Option::is_none")]
524 pub include_all_metadata: Option<bool>,
525 #[serde(skip_serializing_if = "Option::is_none")]
527 pub inclusive: Option<bool>,
528 #[serde(skip_serializing_if = "Option::is_none")]
530 pub latest: Option<String>,
531 #[serde(skip_serializing_if = "Option::is_none")]
533 pub limit: Option<i64>,
534 #[serde(skip_serializing_if = "Option::is_none")]
536 pub oldest: Option<String>,
537}
538
539impl ConversationsHistoryRequest {
540 pub fn new(channel: impl Into<String>) -> Self {
541 Self {
542 channel: channel.into(),
543 cursor: None,
544 include_all_metadata: None,
545 inclusive: None,
546 latest: None,
547 limit: None,
548 oldest: None,
549 }
550 }
551
552 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
553 self.cursor = Some(cursor.into());
554 self
555 }
556
557 pub fn include_all_metadata(mut self, include_all_metadata: bool) -> Self {
558 self.include_all_metadata = Some(include_all_metadata);
559 self
560 }
561
562 pub fn inclusive(mut self, inclusive: bool) -> Self {
563 self.inclusive = Some(inclusive);
564 self
565 }
566
567 pub fn latest(mut self, latest: impl Into<String>) -> Self {
568 self.latest = Some(latest.into());
569 self
570 }
571
572 pub fn limit(mut self, limit: i64) -> Self {
573 self.limit = Some(limit);
574 self
575 }
576
577 pub fn oldest(mut self, oldest: impl Into<String>) -> Self {
578 self.oldest = Some(oldest.into());
579 self
580 }
581}
582
583impl SlackApiMethod for ConversationsHistoryRequest {
584 const METHOD: &'static str = "conversations.history";
585 type Response = ConversationsHistoryResponse;
586}
587
588impl CursorPaginated for ConversationsHistoryRequest {
589 fn set_cursor(&mut self, cursor: String) {
590 self.cursor = Some(cursor);
591 }
592}
593
594impl NextCursor for ConversationsHistoryResponse {
595 fn next_cursor(&self) -> Option<&str> {
596 self.response_metadata.as_ref()?.next_cursor.as_deref()
597 }
598}
599
600#[doc(alias = "conversations.history")]
602#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
603pub struct ConversationsHistoryResponse {
604 #[serde(
605 default,
606 deserialize_with = "crate::de::vec",
607 skip_serializing_if = "Vec::is_empty"
608 )]
609 pub messages: Vec<Message>,
610 #[serde(
611 default,
612 deserialize_with = "crate::de::opt_bool",
613 skip_serializing_if = "Option::is_none"
614 )]
615 pub has_more: Option<bool>,
616 #[serde(
617 default,
618 deserialize_with = "crate::de::opt_i64",
619 skip_serializing_if = "Option::is_none"
620 )]
621 pub pin_count: Option<i64>,
622 #[serde(
623 default,
624 deserialize_with = "crate::de::opt_object",
625 skip_serializing_if = "Option::is_none"
626 )]
627 pub response_metadata: Option<ResponseMetadata>,
628 #[serde(
629 default,
630 deserialize_with = "crate::de::opt_string",
631 skip_serializing_if = "Option::is_none"
632 )]
633 pub latest: Option<String>,
634 #[serde(
635 default,
636 deserialize_with = "crate::de::opt_string",
637 skip_serializing_if = "Option::is_none"
638 )]
639 pub warning: Option<String>,
640}
641
642#[doc(alias = "conversations.info")]
646#[derive(Debug, Clone, PartialEq, Serialize)]
647#[non_exhaustive]
648pub struct ConversationsInfoRequest {
649 pub channel: String,
651 #[serde(skip_serializing_if = "Option::is_none")]
653 pub include_locale: Option<bool>,
654 #[serde(skip_serializing_if = "Option::is_none")]
656 pub include_num_members: Option<bool>,
657}
658
659impl ConversationsInfoRequest {
660 pub fn new(channel: impl Into<String>) -> Self {
661 Self {
662 channel: channel.into(),
663 include_locale: None,
664 include_num_members: None,
665 }
666 }
667
668 pub fn include_locale(mut self, include_locale: bool) -> Self {
669 self.include_locale = Some(include_locale);
670 self
671 }
672
673 pub fn include_num_members(mut self, include_num_members: bool) -> Self {
674 self.include_num_members = Some(include_num_members);
675 self
676 }
677}
678
679impl SlackApiMethod for ConversationsInfoRequest {
680 const METHOD: &'static str = "conversations.info";
681 type Response = ConversationsInfoResponse;
682}
683
684#[doc(alias = "conversations.info")]
686#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
687pub struct ConversationsInfoResponse {
688 #[serde(
689 default,
690 deserialize_with = "crate::de::opt_object",
691 skip_serializing_if = "Option::is_none"
692 )]
693 pub channel: Option<Conversation>,
694 #[serde(
695 default,
696 deserialize_with = "crate::de::opt_object",
697 skip_serializing_if = "Option::is_none"
698 )]
699 pub response_metadata: Option<ResponseMetadata>,
700 #[serde(
701 default,
702 deserialize_with = "crate::de::opt_string",
703 skip_serializing_if = "Option::is_none"
704 )]
705 pub warning: Option<String>,
706}
707
708#[doc(alias = "conversations.invite")]
712#[derive(Debug, Clone, PartialEq, Serialize)]
713#[non_exhaustive]
714pub struct ConversationsInviteRequest {
715 pub channel: String,
717 pub users: String,
719 #[serde(skip_serializing_if = "Option::is_none")]
721 pub force: Option<bool>,
722}
723
724impl ConversationsInviteRequest {
725 pub fn new(channel: impl Into<String>, users: impl Into<String>) -> Self {
726 Self {
727 channel: channel.into(),
728 users: users.into(),
729 force: None,
730 }
731 }
732
733 pub fn force(mut self, force: bool) -> Self {
734 self.force = Some(force);
735 self
736 }
737}
738
739impl SlackApiMethod for ConversationsInviteRequest {
740 const METHOD: &'static str = "conversations.invite";
741 type Response = ConversationsInviteResponse;
742}
743
744#[doc(alias = "conversations.invite")]
746#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
747pub struct ConversationsInviteResponse {
748 #[serde(
749 default,
750 deserialize_with = "crate::de::opt_object",
751 skip_serializing_if = "Option::is_none"
752 )]
753 pub channel: Option<Conversation>,
754 #[serde(
755 default,
756 deserialize_with = "crate::de::opt_object",
757 skip_serializing_if = "Option::is_none"
758 )]
759 pub response_metadata: Option<ResponseMetadata>,
760 #[serde(
761 default,
762 deserialize_with = "crate::de::opt_string",
763 skip_serializing_if = "Option::is_none"
764 )]
765 pub warning: Option<String>,
766}
767
768#[doc(alias = "conversations.inviteShared")]
772#[derive(Debug, Clone, PartialEq, Serialize)]
773#[non_exhaustive]
774pub struct ConversationsInviteSharedRequest {
775 pub channel: String,
777 #[serde(skip_serializing_if = "Option::is_none")]
779 pub emails: Option<Vec<String>>,
780 #[serde(skip_serializing_if = "Option::is_none")]
782 pub user_ids: Option<Vec<String>>,
783 #[serde(skip_serializing_if = "Option::is_none")]
785 pub external_limited: Option<bool>,
786}
787
788impl ConversationsInviteSharedRequest {
789 pub fn new(channel: impl Into<String>) -> Self {
790 Self {
791 channel: channel.into(),
792 emails: None,
793 user_ids: None,
794 external_limited: None,
795 }
796 }
797
798 pub fn emails(mut self, emails: Vec<String>) -> Self {
799 self.emails = Some(emails);
800 self
801 }
802
803 pub fn user_ids(mut self, user_ids: Vec<String>) -> Self {
804 self.user_ids = Some(user_ids);
805 self
806 }
807
808 pub fn external_limited(mut self, external_limited: bool) -> Self {
809 self.external_limited = Some(external_limited);
810 self
811 }
812}
813
814impl SlackApiMethod for ConversationsInviteSharedRequest {
815 const METHOD: &'static str = "conversations.inviteShared";
816 type Response = ConversationsInviteSharedResponse;
817}
818
819#[doc(alias = "conversations.inviteShared")]
821#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
822pub struct ConversationsInviteSharedResponse {
823 #[serde(
824 default,
825 deserialize_with = "crate::de::opt_string",
826 skip_serializing_if = "Option::is_none"
827 )]
828 pub invite_id: Option<String>,
829 #[serde(
830 default,
831 deserialize_with = "crate::de::opt_bool",
832 skip_serializing_if = "Option::is_none"
833 )]
834 pub is_legacy_shared_channel: Option<bool>,
835 #[serde(
836 default,
837 deserialize_with = "crate::de::opt_object",
838 skip_serializing_if = "Option::is_none"
839 )]
840 pub response_metadata: Option<ResponseMetadata>,
841 #[serde(
842 default,
843 deserialize_with = "crate::de::opt_string",
844 skip_serializing_if = "Option::is_none"
845 )]
846 pub warning: Option<String>,
847}
848
849#[doc(alias = "conversations.join")]
853#[derive(Debug, Clone, PartialEq, Serialize)]
854#[non_exhaustive]
855pub struct ConversationsJoinRequest {
856 pub channel: String,
858}
859
860impl ConversationsJoinRequest {
861 pub fn new(channel: impl Into<String>) -> Self {
862 Self {
863 channel: channel.into(),
864 }
865 }
866}
867
868impl SlackApiMethod for ConversationsJoinRequest {
869 const METHOD: &'static str = "conversations.join";
870 type Response = ConversationsJoinResponse;
871}
872
873#[doc(alias = "conversations.join")]
875#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
876pub struct ConversationsJoinResponse {
877 #[serde(
878 default,
879 deserialize_with = "crate::de::opt_object",
880 skip_serializing_if = "Option::is_none"
881 )]
882 pub channel: Option<Conversation>,
883 #[serde(
884 default,
885 deserialize_with = "crate::de::opt_string",
886 skip_serializing_if = "Option::is_none"
887 )]
888 pub warning: Option<String>,
889 #[serde(
890 default,
891 deserialize_with = "crate::de::opt_object",
892 skip_serializing_if = "Option::is_none"
893 )]
894 pub response_metadata: Option<ResponseMetadata>,
895}
896
897#[doc(alias = "conversations.kick")]
901#[derive(Debug, Clone, PartialEq, Serialize)]
902#[non_exhaustive]
903pub struct ConversationsKickRequest {
904 pub channel: String,
906 #[serde(skip_serializing_if = "Option::is_none")]
908 pub user: Option<String>,
909}
910
911impl ConversationsKickRequest {
912 pub fn new(channel: impl Into<String>) -> Self {
913 Self {
914 channel: channel.into(),
915 user: None,
916 }
917 }
918
919 pub fn user(mut self, user: impl Into<String>) -> Self {
920 self.user = Some(user.into());
921 self
922 }
923}
924
925impl SlackApiMethod for ConversationsKickRequest {
926 const METHOD: &'static str = "conversations.kick";
927 type Response = ConversationsKickResponse;
928}
929
930#[doc(alias = "conversations.kick")]
932#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
933pub struct ConversationsKickResponse {
934 #[serde(
935 default,
936 deserialize_with = "crate::de::opt_object",
937 skip_serializing_if = "Option::is_none"
938 )]
939 pub errors: Option<serde_json::Map<String, serde_json::Value>>,
940 #[serde(
941 default,
942 deserialize_with = "crate::de::opt_object",
943 skip_serializing_if = "Option::is_none"
944 )]
945 pub response_metadata: Option<ResponseMetadata>,
946 #[serde(
947 default,
948 deserialize_with = "crate::de::opt_string",
949 skip_serializing_if = "Option::is_none"
950 )]
951 pub warning: Option<String>,
952}
953
954#[doc(alias = "conversations.leave")]
958#[derive(Debug, Clone, PartialEq, Serialize)]
959#[non_exhaustive]
960pub struct ConversationsLeaveRequest {
961 pub channel: String,
963}
964
965impl ConversationsLeaveRequest {
966 pub fn new(channel: impl Into<String>) -> Self {
967 Self {
968 channel: channel.into(),
969 }
970 }
971}
972
973impl SlackApiMethod for ConversationsLeaveRequest {
974 const METHOD: &'static str = "conversations.leave";
975 type Response = ConversationsLeaveResponse;
976}
977
978#[doc(alias = "conversations.leave")]
980#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
981pub struct ConversationsLeaveResponse {
982 #[serde(flatten)]
984 pub extra: serde_json::Map<String, serde_json::Value>,
985 #[serde(
986 default,
987 deserialize_with = "crate::de::opt_object",
988 skip_serializing_if = "Option::is_none"
989 )]
990 pub response_metadata: Option<ResponseMetadata>,
991 #[serde(
992 default,
993 deserialize_with = "crate::de::opt_string",
994 skip_serializing_if = "Option::is_none"
995 )]
996 pub warning: Option<String>,
997}
998
999#[doc(alias = "conversations.list")]
1003#[derive(Debug, Clone, PartialEq, Serialize, Default)]
1004#[non_exhaustive]
1005pub struct ConversationsListRequest {
1006 #[serde(skip_serializing_if = "Option::is_none")]
1008 pub cursor: Option<String>,
1009 #[serde(skip_serializing_if = "Option::is_none")]
1011 pub exclude_archived: Option<bool>,
1012 #[serde(skip_serializing_if = "Option::is_none")]
1014 pub limit: Option<i64>,
1015 #[serde(skip_serializing_if = "Option::is_none")]
1017 pub team_id: Option<String>,
1018 #[serde(skip_serializing_if = "Option::is_none")]
1020 pub types: Option<String>,
1021}
1022
1023impl ConversationsListRequest {
1024 pub fn new() -> Self {
1025 Self {
1026 cursor: None,
1027 exclude_archived: None,
1028 limit: None,
1029 team_id: None,
1030 types: None,
1031 }
1032 }
1033
1034 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
1035 self.cursor = Some(cursor.into());
1036 self
1037 }
1038
1039 pub fn exclude_archived(mut self, exclude_archived: bool) -> Self {
1040 self.exclude_archived = Some(exclude_archived);
1041 self
1042 }
1043
1044 pub fn limit(mut self, limit: i64) -> Self {
1045 self.limit = Some(limit);
1046 self
1047 }
1048
1049 pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
1050 self.team_id = Some(team_id.into());
1051 self
1052 }
1053
1054 pub fn types(mut self, types: impl Into<String>) -> Self {
1055 self.types = Some(types.into());
1056 self
1057 }
1058}
1059
1060impl SlackApiMethod for ConversationsListRequest {
1061 const METHOD: &'static str = "conversations.list";
1062 type Response = ConversationsListResponse;
1063}
1064
1065impl CursorPaginated for ConversationsListRequest {
1066 fn set_cursor(&mut self, cursor: String) {
1067 self.cursor = Some(cursor);
1068 }
1069}
1070
1071impl NextCursor for ConversationsListResponse {
1072 fn next_cursor(&self) -> Option<&str> {
1073 self.response_metadata.as_ref()?.next_cursor.as_deref()
1074 }
1075}
1076
1077#[doc(alias = "conversations.list")]
1079#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1080pub struct ConversationsListResponse {
1081 #[serde(
1082 default,
1083 deserialize_with = "crate::de::vec",
1084 skip_serializing_if = "Vec::is_empty"
1085 )]
1086 pub channels: Vec<Conversation>,
1087 #[serde(
1088 default,
1089 deserialize_with = "crate::de::opt_object",
1090 skip_serializing_if = "Option::is_none"
1091 )]
1092 pub response_metadata: Option<ResponseMetadata>,
1093 #[serde(
1094 default,
1095 deserialize_with = "crate::de::opt_string",
1096 skip_serializing_if = "Option::is_none"
1097 )]
1098 pub warning: Option<String>,
1099}
1100
1101#[doc(alias = "conversations.listConnectInvites")]
1105#[derive(Debug, Clone, PartialEq, Serialize, Default)]
1106#[non_exhaustive]
1107pub struct ConversationsListConnectInvitesRequest {
1108 #[serde(skip_serializing_if = "Option::is_none")]
1110 pub team_id: Option<String>,
1111 #[serde(skip_serializing_if = "Option::is_none")]
1113 pub count: Option<i64>,
1114 #[serde(skip_serializing_if = "Option::is_none")]
1116 pub cursor: Option<String>,
1117}
1118
1119impl ConversationsListConnectInvitesRequest {
1120 pub fn new() -> Self {
1121 Self {
1122 team_id: None,
1123 count: None,
1124 cursor: None,
1125 }
1126 }
1127
1128 pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
1129 self.team_id = Some(team_id.into());
1130 self
1131 }
1132
1133 pub fn count(mut self, count: i64) -> Self {
1134 self.count = Some(count);
1135 self
1136 }
1137
1138 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
1139 self.cursor = Some(cursor.into());
1140 self
1141 }
1142}
1143
1144impl SlackApiMethod for ConversationsListConnectInvitesRequest {
1145 const METHOD: &'static str = "conversations.listConnectInvites";
1146 type Response = ConversationsListConnectInvitesResponse;
1147}
1148
1149impl CursorPaginated for ConversationsListConnectInvitesRequest {
1150 fn set_cursor(&mut self, cursor: String) {
1151 self.cursor = Some(cursor);
1152 }
1153}
1154
1155impl NextCursor for ConversationsListConnectInvitesResponse {
1156 fn next_cursor(&self) -> Option<&str> {
1157 self.response_metadata.as_ref()?.next_cursor.as_deref()
1158 }
1159}
1160
1161#[doc(alias = "conversations.listConnectInvites")]
1163#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1164pub struct ConversationsListConnectInvitesResponse {
1165 #[serde(
1166 default,
1167 deserialize_with = "crate::de::vec",
1168 skip_serializing_if = "Vec::is_empty"
1169 )]
1170 pub invites: Vec<ConversationsListConnectInvitesResponseInvites>,
1171 #[serde(
1172 default,
1173 deserialize_with = "crate::de::opt_object",
1174 skip_serializing_if = "Option::is_none"
1175 )]
1176 pub response_metadata: Option<ResponseMetadata>,
1177 #[serde(
1178 default,
1179 deserialize_with = "crate::de::opt_string",
1180 skip_serializing_if = "Option::is_none"
1181 )]
1182 pub warning: Option<String>,
1183}
1184
1185#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1186pub struct ConversationsListConnectInvitesResponseInvites {
1187 #[serde(
1188 default,
1189 deserialize_with = "crate::de::opt_string",
1190 skip_serializing_if = "Option::is_none"
1191 )]
1192 pub direction: Option<String>,
1193 #[serde(
1194 default,
1195 deserialize_with = "crate::de::opt_string",
1196 skip_serializing_if = "Option::is_none"
1197 )]
1198 pub status: Option<String>,
1199 #[serde(
1200 default,
1201 deserialize_with = "crate::de::opt_i64",
1202 skip_serializing_if = "Option::is_none"
1203 )]
1204 pub date_last_updated: Option<i64>,
1205 #[serde(
1206 default,
1207 deserialize_with = "crate::de::opt_string",
1208 skip_serializing_if = "Option::is_none"
1209 )]
1210 pub invite_type: Option<String>,
1211 #[serde(
1212 default,
1213 deserialize_with = "crate::de::opt_object",
1214 skip_serializing_if = "Option::is_none"
1215 )]
1216 pub invite: Option<ConversationsListConnectInvitesResponseInvitesInvite>,
1217 #[serde(
1218 default,
1219 deserialize_with = "crate::de::opt_object",
1220 skip_serializing_if = "Option::is_none"
1221 )]
1222 pub channel: Option<Conversation>,
1223 #[serde(
1224 default,
1225 deserialize_with = "crate::de::vec",
1226 skip_serializing_if = "Vec::is_empty"
1227 )]
1228 pub acceptances: Vec<ConversationsListConnectInvitesResponseInvitesAcceptances>,
1229}
1230
1231#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1232pub struct ConversationsListConnectInvitesResponseInvitesInvite {
1233 #[serde(
1234 default,
1235 deserialize_with = "crate::de::opt_string",
1236 skip_serializing_if = "Option::is_none"
1237 )]
1238 pub id: Option<String>,
1239 #[serde(
1240 default,
1241 deserialize_with = "crate::de::opt_i64",
1242 skip_serializing_if = "Option::is_none"
1243 )]
1244 pub date_created: Option<i64>,
1245 #[serde(
1246 default,
1247 deserialize_with = "crate::de::opt_i64",
1248 skip_serializing_if = "Option::is_none"
1249 )]
1250 pub date_invalid: Option<i64>,
1251 #[serde(
1252 default,
1253 deserialize_with = "crate::de::opt_object",
1254 skip_serializing_if = "Option::is_none"
1255 )]
1256 pub inviting_team: Option<Team>,
1257 #[serde(
1258 default,
1259 deserialize_with = "crate::de::opt_object",
1260 skip_serializing_if = "Option::is_none"
1261 )]
1262 pub inviting_user: Option<User>,
1263 #[serde(
1264 default,
1265 deserialize_with = "crate::de::opt_string",
1266 skip_serializing_if = "Option::is_none"
1267 )]
1268 pub link: Option<String>,
1269}
1270
1271#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1272pub struct ConversationsListConnectInvitesResponseInvitesAcceptances {
1273 #[serde(
1274 default,
1275 deserialize_with = "crate::de::opt_string",
1276 skip_serializing_if = "Option::is_none"
1277 )]
1278 pub approval_status: Option<String>,
1279 #[serde(
1280 default,
1281 deserialize_with = "crate::de::opt_i64",
1282 skip_serializing_if = "Option::is_none"
1283 )]
1284 pub date_accepted: Option<i64>,
1285 #[serde(
1286 default,
1287 deserialize_with = "crate::de::opt_i64",
1288 skip_serializing_if = "Option::is_none"
1289 )]
1290 pub date_invalid: Option<i64>,
1291 #[serde(
1292 default,
1293 deserialize_with = "crate::de::opt_i64",
1294 skip_serializing_if = "Option::is_none"
1295 )]
1296 pub date_last_updated: Option<i64>,
1297 #[serde(
1298 default,
1299 deserialize_with = "crate::de::opt_object",
1300 skip_serializing_if = "Option::is_none"
1301 )]
1302 pub accepting_team: Option<Team>,
1303 #[serde(
1304 default,
1305 deserialize_with = "crate::de::opt_object",
1306 skip_serializing_if = "Option::is_none"
1307 )]
1308 pub accepting_user: Option<User>,
1309 #[serde(
1310 default,
1311 deserialize_with = "crate::de::vec",
1312 skip_serializing_if = "Vec::is_empty"
1313 )]
1314 pub reviews: Vec<ConversationsListConnectInvitesResponseInvitesAcceptancesReviews>,
1315}
1316
1317#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1318pub struct ConversationsListConnectInvitesResponseInvitesAcceptancesReviews {
1319 #[serde(
1320 default,
1321 deserialize_with = "crate::de::opt_string",
1322 skip_serializing_if = "Option::is_none"
1323 )]
1324 pub r#type: Option<String>,
1325 #[serde(
1326 default,
1327 deserialize_with = "crate::de::opt_i64",
1328 skip_serializing_if = "Option::is_none"
1329 )]
1330 pub date_review: Option<i64>,
1331 #[serde(
1332 default,
1333 deserialize_with = "crate::de::opt_object",
1334 skip_serializing_if = "Option::is_none"
1335 )]
1336 pub reviewing_team: Option<Team>,
1337}
1338
1339#[doc(alias = "conversations.mark")]
1343#[derive(Debug, Clone, PartialEq, Serialize)]
1344#[non_exhaustive]
1345pub struct ConversationsMarkRequest {
1346 pub channel: String,
1348 pub ts: String,
1350}
1351
1352impl ConversationsMarkRequest {
1353 pub fn new(channel: impl Into<String>, ts: impl Into<String>) -> Self {
1354 Self {
1355 channel: channel.into(),
1356 ts: ts.into(),
1357 }
1358 }
1359}
1360
1361impl SlackApiMethod for ConversationsMarkRequest {
1362 const METHOD: &'static str = "conversations.mark";
1363 type Response = ConversationsMarkResponse;
1364}
1365
1366#[doc(alias = "conversations.mark")]
1368#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1369pub struct ConversationsMarkResponse {
1370 #[serde(flatten)]
1372 pub extra: serde_json::Map<String, serde_json::Value>,
1373 #[serde(
1374 default,
1375 deserialize_with = "crate::de::opt_object",
1376 skip_serializing_if = "Option::is_none"
1377 )]
1378 pub response_metadata: Option<ResponseMetadata>,
1379 #[serde(
1380 default,
1381 deserialize_with = "crate::de::opt_string",
1382 skip_serializing_if = "Option::is_none"
1383 )]
1384 pub warning: Option<String>,
1385}
1386
1387#[doc(alias = "conversations.members")]
1391#[derive(Debug, Clone, PartialEq, Serialize)]
1392#[non_exhaustive]
1393pub struct ConversationsMembersRequest {
1394 pub channel: String,
1396 #[serde(skip_serializing_if = "Option::is_none")]
1398 pub cursor: Option<String>,
1399 #[serde(skip_serializing_if = "Option::is_none")]
1401 pub limit: Option<i64>,
1402}
1403
1404impl ConversationsMembersRequest {
1405 pub fn new(channel: impl Into<String>) -> Self {
1406 Self {
1407 channel: channel.into(),
1408 cursor: None,
1409 limit: None,
1410 }
1411 }
1412
1413 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
1414 self.cursor = Some(cursor.into());
1415 self
1416 }
1417
1418 pub fn limit(mut self, limit: i64) -> Self {
1419 self.limit = Some(limit);
1420 self
1421 }
1422}
1423
1424impl SlackApiMethod for ConversationsMembersRequest {
1425 const METHOD: &'static str = "conversations.members";
1426 type Response = ConversationsMembersResponse;
1427}
1428
1429impl CursorPaginated for ConversationsMembersRequest {
1430 fn set_cursor(&mut self, cursor: String) {
1431 self.cursor = Some(cursor);
1432 }
1433}
1434
1435impl NextCursor for ConversationsMembersResponse {
1436 fn next_cursor(&self) -> Option<&str> {
1437 self.response_metadata.as_ref()?.next_cursor.as_deref()
1438 }
1439}
1440
1441#[doc(alias = "conversations.members")]
1443#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1444pub struct ConversationsMembersResponse {
1445 #[serde(
1446 default,
1447 deserialize_with = "crate::de::vec",
1448 skip_serializing_if = "Vec::is_empty"
1449 )]
1450 pub members: Vec<String>,
1451 #[serde(
1452 default,
1453 deserialize_with = "crate::de::opt_object",
1454 skip_serializing_if = "Option::is_none"
1455 )]
1456 pub response_metadata: Option<ResponseMetadata>,
1457 #[serde(
1458 default,
1459 deserialize_with = "crate::de::opt_string",
1460 skip_serializing_if = "Option::is_none"
1461 )]
1462 pub warning: Option<String>,
1463}
1464
1465#[doc(alias = "conversations.open")]
1469#[derive(Debug, Clone, PartialEq, Serialize, Default)]
1470#[non_exhaustive]
1471pub struct ConversationsOpenRequest {
1472 #[serde(skip_serializing_if = "Option::is_none")]
1474 pub channel: Option<String>,
1475 #[serde(skip_serializing_if = "Option::is_none")]
1477 pub return_im: Option<bool>,
1478 #[serde(skip_serializing_if = "Option::is_none")]
1480 pub users: Option<String>,
1481 #[serde(skip_serializing_if = "Option::is_none")]
1483 pub prevent_creation: Option<bool>,
1484}
1485
1486impl ConversationsOpenRequest {
1487 pub fn new() -> Self {
1488 Self {
1489 channel: None,
1490 return_im: None,
1491 users: None,
1492 prevent_creation: None,
1493 }
1494 }
1495
1496 pub fn channel(mut self, channel: impl Into<String>) -> Self {
1497 self.channel = Some(channel.into());
1498 self
1499 }
1500
1501 pub fn return_im(mut self, return_im: bool) -> Self {
1502 self.return_im = Some(return_im);
1503 self
1504 }
1505
1506 pub fn users(mut self, users: impl Into<String>) -> Self {
1507 self.users = Some(users.into());
1508 self
1509 }
1510
1511 pub fn prevent_creation(mut self, prevent_creation: bool) -> Self {
1512 self.prevent_creation = Some(prevent_creation);
1513 self
1514 }
1515}
1516
1517impl SlackApiMethod for ConversationsOpenRequest {
1518 const METHOD: &'static str = "conversations.open";
1519 type Response = ConversationsOpenResponse;
1520}
1521
1522#[doc(alias = "conversations.open")]
1524#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1525pub struct ConversationsOpenResponse {
1526 #[serde(
1527 default,
1528 deserialize_with = "crate::de::opt_object",
1529 skip_serializing_if = "Option::is_none"
1530 )]
1531 pub channel: Option<Conversation>,
1532 #[serde(
1533 default,
1534 deserialize_with = "crate::de::opt_bool",
1535 skip_serializing_if = "Option::is_none"
1536 )]
1537 pub no_op: Option<bool>,
1538 #[serde(
1539 default,
1540 deserialize_with = "crate::de::opt_bool",
1541 skip_serializing_if = "Option::is_none"
1542 )]
1543 pub already_open: Option<bool>,
1544 #[serde(
1545 default,
1546 deserialize_with = "crate::de::opt_object",
1547 skip_serializing_if = "Option::is_none"
1548 )]
1549 pub response_metadata: Option<ResponseMetadata>,
1550 #[serde(
1551 default,
1552 deserialize_with = "crate::de::opt_string",
1553 skip_serializing_if = "Option::is_none"
1554 )]
1555 pub warning: Option<String>,
1556}
1557
1558#[doc(alias = "conversations.rename")]
1562#[derive(Debug, Clone, PartialEq, Serialize)]
1563#[non_exhaustive]
1564pub struct ConversationsRenameRequest {
1565 pub channel: String,
1567 pub name: String,
1569}
1570
1571impl ConversationsRenameRequest {
1572 pub fn new(channel: impl Into<String>, name: impl Into<String>) -> Self {
1573 Self {
1574 channel: channel.into(),
1575 name: name.into(),
1576 }
1577 }
1578}
1579
1580impl SlackApiMethod for ConversationsRenameRequest {
1581 const METHOD: &'static str = "conversations.rename";
1582 type Response = ConversationsRenameResponse;
1583}
1584
1585#[doc(alias = "conversations.rename")]
1587#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1588pub struct ConversationsRenameResponse {
1589 #[serde(
1590 default,
1591 deserialize_with = "crate::de::opt_object",
1592 skip_serializing_if = "Option::is_none"
1593 )]
1594 pub channel: Option<Conversation>,
1595 #[serde(
1596 default,
1597 deserialize_with = "crate::de::opt_object",
1598 skip_serializing_if = "Option::is_none"
1599 )]
1600 pub response_metadata: Option<ResponseMetadata>,
1601 #[serde(
1602 default,
1603 deserialize_with = "crate::de::opt_string",
1604 skip_serializing_if = "Option::is_none"
1605 )]
1606 pub warning: Option<String>,
1607}
1608
1609#[doc(alias = "conversations.replies")]
1613#[derive(Debug, Clone, PartialEq, Serialize)]
1614#[non_exhaustive]
1615pub struct ConversationsRepliesRequest {
1616 pub channel: String,
1618 pub ts: String,
1620 #[serde(skip_serializing_if = "Option::is_none")]
1622 pub cursor: Option<String>,
1623 #[serde(skip_serializing_if = "Option::is_none")]
1625 pub include_all_metadata: Option<bool>,
1626 #[serde(skip_serializing_if = "Option::is_none")]
1628 pub inclusive: Option<bool>,
1629 #[serde(skip_serializing_if = "Option::is_none")]
1631 pub latest: Option<String>,
1632 #[serde(skip_serializing_if = "Option::is_none")]
1634 pub limit: Option<i64>,
1635 #[serde(skip_serializing_if = "Option::is_none")]
1637 pub oldest: Option<String>,
1638}
1639
1640impl ConversationsRepliesRequest {
1641 pub fn new(channel: impl Into<String>, ts: impl Into<String>) -> Self {
1642 Self {
1643 channel: channel.into(),
1644 ts: ts.into(),
1645 cursor: None,
1646 include_all_metadata: None,
1647 inclusive: None,
1648 latest: None,
1649 limit: None,
1650 oldest: None,
1651 }
1652 }
1653
1654 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
1655 self.cursor = Some(cursor.into());
1656 self
1657 }
1658
1659 pub fn include_all_metadata(mut self, include_all_metadata: bool) -> Self {
1660 self.include_all_metadata = Some(include_all_metadata);
1661 self
1662 }
1663
1664 pub fn inclusive(mut self, inclusive: bool) -> Self {
1665 self.inclusive = Some(inclusive);
1666 self
1667 }
1668
1669 pub fn latest(mut self, latest: impl Into<String>) -> Self {
1670 self.latest = Some(latest.into());
1671 self
1672 }
1673
1674 pub fn limit(mut self, limit: i64) -> Self {
1675 self.limit = Some(limit);
1676 self
1677 }
1678
1679 pub fn oldest(mut self, oldest: impl Into<String>) -> Self {
1680 self.oldest = Some(oldest.into());
1681 self
1682 }
1683}
1684
1685impl SlackApiMethod for ConversationsRepliesRequest {
1686 const METHOD: &'static str = "conversations.replies";
1687 type Response = ConversationsRepliesResponse;
1688}
1689
1690impl CursorPaginated for ConversationsRepliesRequest {
1691 fn set_cursor(&mut self, cursor: String) {
1692 self.cursor = Some(cursor);
1693 }
1694}
1695
1696impl NextCursor for ConversationsRepliesResponse {
1697 fn next_cursor(&self) -> Option<&str> {
1698 self.response_metadata.as_ref()?.next_cursor.as_deref()
1699 }
1700}
1701
1702#[doc(alias = "conversations.replies")]
1704#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1705pub struct ConversationsRepliesResponse {
1706 #[serde(
1707 default,
1708 deserialize_with = "crate::de::vec",
1709 skip_serializing_if = "Vec::is_empty"
1710 )]
1711 pub messages: Vec<Message>,
1712 #[serde(
1713 default,
1714 deserialize_with = "crate::de::opt_bool",
1715 skip_serializing_if = "Option::is_none"
1716 )]
1717 pub has_more: Option<bool>,
1718 #[serde(
1719 default,
1720 deserialize_with = "crate::de::opt_object",
1721 skip_serializing_if = "Option::is_none"
1722 )]
1723 pub response_metadata: Option<ResponseMetadata>,
1724 #[serde(
1725 default,
1726 deserialize_with = "crate::de::opt_string",
1727 skip_serializing_if = "Option::is_none"
1728 )]
1729 pub warning: Option<String>,
1730}
1731
1732#[doc(alias = "conversations.requestSharedInvite.approve")]
1736#[derive(Debug, Clone, PartialEq, Serialize)]
1737#[non_exhaustive]
1738pub struct ConversationsRequestSharedInviteApproveRequest {
1739 pub invite_id: String,
1741 #[serde(skip_serializing_if = "Option::is_none")]
1743 pub is_external_limited: Option<bool>,
1744 #[serde(skip_serializing_if = "Option::is_none")]
1746 pub channel_id: Option<String>,
1747 #[serde(skip_serializing_if = "Option::is_none")]
1749 pub message: Option<serde_json::Value>,
1750}
1751
1752impl ConversationsRequestSharedInviteApproveRequest {
1753 pub fn new(invite_id: impl Into<String>) -> Self {
1754 Self {
1755 invite_id: invite_id.into(),
1756 is_external_limited: None,
1757 channel_id: None,
1758 message: None,
1759 }
1760 }
1761
1762 pub fn is_external_limited(mut self, is_external_limited: bool) -> Self {
1763 self.is_external_limited = Some(is_external_limited);
1764 self
1765 }
1766
1767 pub fn channel_id(mut self, channel_id: impl Into<String>) -> Self {
1768 self.channel_id = Some(channel_id.into());
1769 self
1770 }
1771
1772 pub fn message(mut self, message: serde_json::Value) -> Self {
1773 self.message = Some(message);
1774 self
1775 }
1776}
1777
1778impl SlackApiMethod for ConversationsRequestSharedInviteApproveRequest {
1779 const METHOD: &'static str = "conversations.requestSharedInvite.approve";
1780 type Response = ConversationsRequestSharedInviteApproveResponse;
1781}
1782
1783#[doc(alias = "conversations.requestSharedInvite.approve")]
1785#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1786pub struct ConversationsRequestSharedInviteApproveResponse {
1787 #[serde(
1788 default,
1789 deserialize_with = "crate::de::opt_string",
1790 skip_serializing_if = "Option::is_none"
1791 )]
1792 pub invite_id: Option<String>,
1793 #[serde(
1794 default,
1795 deserialize_with = "crate::de::opt_object",
1796 skip_serializing_if = "Option::is_none"
1797 )]
1798 pub response_metadata: Option<ResponseMetadata>,
1799 #[serde(
1800 default,
1801 deserialize_with = "crate::de::opt_string",
1802 skip_serializing_if = "Option::is_none"
1803 )]
1804 pub warning: Option<String>,
1805}
1806
1807#[doc(alias = "conversations.requestSharedInvite.deny")]
1811#[derive(Debug, Clone, PartialEq, Serialize)]
1812#[non_exhaustive]
1813pub struct ConversationsRequestSharedInviteDenyRequest {
1814 pub invite_id: String,
1816 #[serde(skip_serializing_if = "Option::is_none")]
1818 pub message: Option<String>,
1819}
1820
1821impl ConversationsRequestSharedInviteDenyRequest {
1822 pub fn new(invite_id: impl Into<String>) -> Self {
1823 Self {
1824 invite_id: invite_id.into(),
1825 message: None,
1826 }
1827 }
1828
1829 pub fn message(mut self, message: impl Into<String>) -> Self {
1830 self.message = Some(message.into());
1831 self
1832 }
1833}
1834
1835impl SlackApiMethod for ConversationsRequestSharedInviteDenyRequest {
1836 const METHOD: &'static str = "conversations.requestSharedInvite.deny";
1837 type Response = ConversationsRequestSharedInviteDenyResponse;
1838}
1839
1840#[doc(alias = "conversations.requestSharedInvite.deny")]
1842#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1843pub struct ConversationsRequestSharedInviteDenyResponse {
1844 #[serde(
1845 default,
1846 deserialize_with = "crate::de::opt_string",
1847 skip_serializing_if = "Option::is_none"
1848 )]
1849 pub invite_id: Option<String>,
1850 #[serde(
1851 default,
1852 deserialize_with = "crate::de::opt_object",
1853 skip_serializing_if = "Option::is_none"
1854 )]
1855 pub response_metadata: Option<ResponseMetadata>,
1856 #[serde(
1857 default,
1858 deserialize_with = "crate::de::opt_string",
1859 skip_serializing_if = "Option::is_none"
1860 )]
1861 pub warning: Option<String>,
1862}
1863
1864#[doc(alias = "conversations.requestSharedInvite.list")]
1868#[derive(Debug, Clone, PartialEq, Serialize, Default)]
1869#[non_exhaustive]
1870pub struct ConversationsRequestSharedInviteListRequest {
1871 #[serde(skip_serializing_if = "Option::is_none")]
1873 pub user_id: Option<String>,
1874 #[serde(skip_serializing_if = "Option::is_none")]
1876 pub include_expired: Option<bool>,
1877 #[serde(skip_serializing_if = "Option::is_none")]
1879 pub include_approved: Option<bool>,
1880 #[serde(skip_serializing_if = "Option::is_none")]
1882 pub include_denied: Option<bool>,
1883 #[serde(skip_serializing_if = "Option::is_none")]
1885 pub invite_ids: Option<Vec<String>>,
1886 #[serde(skip_serializing_if = "Option::is_none")]
1888 pub limit: Option<i64>,
1889 #[serde(skip_serializing_if = "Option::is_none")]
1891 pub cursor: Option<String>,
1892}
1893
1894impl ConversationsRequestSharedInviteListRequest {
1895 pub fn new() -> Self {
1896 Self {
1897 user_id: None,
1898 include_expired: None,
1899 include_approved: None,
1900 include_denied: None,
1901 invite_ids: None,
1902 limit: None,
1903 cursor: None,
1904 }
1905 }
1906
1907 pub fn user_id(mut self, user_id: impl Into<String>) -> Self {
1908 self.user_id = Some(user_id.into());
1909 self
1910 }
1911
1912 pub fn include_expired(mut self, include_expired: bool) -> Self {
1913 self.include_expired = Some(include_expired);
1914 self
1915 }
1916
1917 pub fn include_approved(mut self, include_approved: bool) -> Self {
1918 self.include_approved = Some(include_approved);
1919 self
1920 }
1921
1922 pub fn include_denied(mut self, include_denied: bool) -> Self {
1923 self.include_denied = Some(include_denied);
1924 self
1925 }
1926
1927 pub fn invite_ids(mut self, invite_ids: Vec<String>) -> Self {
1928 self.invite_ids = Some(invite_ids);
1929 self
1930 }
1931
1932 pub fn limit(mut self, limit: i64) -> Self {
1933 self.limit = Some(limit);
1934 self
1935 }
1936
1937 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
1938 self.cursor = Some(cursor.into());
1939 self
1940 }
1941}
1942
1943impl SlackApiMethod for ConversationsRequestSharedInviteListRequest {
1944 const METHOD: &'static str = "conversations.requestSharedInvite.list";
1945 type Response = ConversationsRequestSharedInviteListResponse;
1946}
1947
1948impl CursorPaginated for ConversationsRequestSharedInviteListRequest {
1949 fn set_cursor(&mut self, cursor: String) {
1950 self.cursor = Some(cursor);
1951 }
1952}
1953
1954impl NextCursor for ConversationsRequestSharedInviteListResponse {
1955 fn next_cursor(&self) -> Option<&str> {
1956 self.response_metadata.as_ref()?.next_cursor.as_deref()
1957 }
1958}
1959
1960#[doc(alias = "conversations.requestSharedInvite.list")]
1962#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1963pub struct ConversationsRequestSharedInviteListResponse {
1964 #[serde(
1965 default,
1966 deserialize_with = "crate::de::vec",
1967 skip_serializing_if = "Vec::is_empty"
1968 )]
1969 pub invite_requests: Vec<ConversationsRequestSharedInviteListResponseInviteRequests>,
1970 #[serde(
1971 default,
1972 deserialize_with = "crate::de::opt_object",
1973 skip_serializing_if = "Option::is_none"
1974 )]
1975 pub response_metadata: Option<ResponseMetadata>,
1976 #[serde(
1977 default,
1978 deserialize_with = "crate::de::opt_string",
1979 skip_serializing_if = "Option::is_none"
1980 )]
1981 pub warning: Option<String>,
1982}
1983
1984#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1985pub struct ConversationsRequestSharedInviteListResponseInviteRequests {
1986 #[serde(
1987 default,
1988 deserialize_with = "crate::de::opt_i64",
1989 skip_serializing_if = "Option::is_none"
1990 )]
1991 pub date_last_updated: Option<i64>,
1992 #[serde(
1993 default,
1994 deserialize_with = "crate::de::opt_string",
1995 skip_serializing_if = "Option::is_none"
1996 )]
1997 pub id: Option<String>,
1998 #[serde(
1999 default,
2000 deserialize_with = "crate::de::opt_i64",
2001 skip_serializing_if = "Option::is_none"
2002 )]
2003 pub date_created: Option<i64>,
2004 #[serde(
2005 default,
2006 deserialize_with = "crate::de::opt_i64",
2007 skip_serializing_if = "Option::is_none"
2008 )]
2009 pub expires_at: Option<i64>,
2010 #[serde(
2011 default,
2012 deserialize_with = "crate::de::opt_object",
2013 skip_serializing_if = "Option::is_none"
2014 )]
2015 pub inviting_team: Option<Team>,
2016 #[serde(
2017 default,
2018 deserialize_with = "crate::de::opt_object",
2019 skip_serializing_if = "Option::is_none"
2020 )]
2021 pub inviting_user: Option<User>,
2022 #[serde(
2023 default,
2024 deserialize_with = "crate::de::opt_bool",
2025 skip_serializing_if = "Option::is_none"
2026 )]
2027 pub is_external_limited: Option<bool>,
2028 #[serde(
2029 default,
2030 deserialize_with = "crate::de::opt_bool",
2031 skip_serializing_if = "Option::is_none"
2032 )]
2033 pub is_sponsored: Option<bool>,
2034 #[serde(
2035 default,
2036 deserialize_with = "crate::de::opt_string",
2037 skip_serializing_if = "Option::is_none"
2038 )]
2039 pub recipient_email: Option<String>,
2040 #[serde(
2041 default,
2042 deserialize_with = "crate::de::opt_object",
2043 skip_serializing_if = "Option::is_none"
2044 )]
2045 pub target_user: Option<ConversationsRequestSharedInviteListResponseInviteRequestsTargetUser>,
2046 #[serde(
2047 default,
2048 deserialize_with = "crate::de::opt_i64",
2049 skip_serializing_if = "Option::is_none"
2050 )]
2051 pub date_denied: Option<i64>,
2052 #[serde(
2053 default,
2054 deserialize_with = "crate::de::opt_object",
2055 skip_serializing_if = "Option::is_none"
2056 )]
2057 pub channel: Option<Conversation>,
2058 #[serde(
2059 default,
2060 deserialize_with = "crate::de::opt_object",
2061 skip_serializing_if = "Option::is_none"
2062 )]
2063 pub reviewing_user:
2064 Option<ConversationsRequestSharedInviteListResponseInviteRequestsReviewingUser>,
2065}
2066
2067#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2068pub struct ConversationsRequestSharedInviteListResponseInviteRequestsTargetUser {
2069 #[serde(
2070 default,
2071 deserialize_with = "crate::de::opt_string",
2072 skip_serializing_if = "Option::is_none"
2073 )]
2074 pub recipient_email: Option<String>,
2075 #[serde(
2076 default,
2077 deserialize_with = "crate::de::opt_string",
2078 skip_serializing_if = "Option::is_none"
2079 )]
2080 pub recipient_user_id: Option<String>,
2081}
2082
2083#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2084pub struct ConversationsRequestSharedInviteListResponseInviteRequestsReviewingUser {
2085 #[serde(
2086 default,
2087 deserialize_with = "crate::de::opt_string",
2088 skip_serializing_if = "Option::is_none"
2089 )]
2090 pub id: Option<String>,
2091 #[serde(
2092 default,
2093 deserialize_with = "crate::de::opt_string",
2094 skip_serializing_if = "Option::is_none"
2095 )]
2096 pub team_id: Option<String>,
2097 #[serde(
2098 default,
2099 deserialize_with = "crate::de::opt_string",
2100 skip_serializing_if = "Option::is_none"
2101 )]
2102 pub name: Option<String>,
2103 #[serde(
2104 default,
2105 deserialize_with = "crate::de::opt_i64",
2106 skip_serializing_if = "Option::is_none"
2107 )]
2108 pub updated: Option<i64>,
2109 #[serde(
2110 default,
2111 deserialize_with = "crate::de::opt_string",
2112 skip_serializing_if = "Option::is_none"
2113 )]
2114 pub who_can_share_contact_card: Option<String>,
2115 #[serde(
2116 default,
2117 deserialize_with = "crate::de::opt_object",
2118 skip_serializing_if = "Option::is_none"
2119 )]
2120 pub profile: Option<UserProfile>,
2121}
2122
2123#[doc(alias = "conversations.setPurpose")]
2127#[derive(Debug, Clone, PartialEq, Serialize)]
2128#[non_exhaustive]
2129pub struct ConversationsSetPurposeRequest {
2130 pub channel: String,
2132 pub purpose: String,
2134}
2135
2136impl ConversationsSetPurposeRequest {
2137 pub fn new(channel: impl Into<String>, purpose: impl Into<String>) -> Self {
2138 Self {
2139 channel: channel.into(),
2140 purpose: purpose.into(),
2141 }
2142 }
2143}
2144
2145impl SlackApiMethod for ConversationsSetPurposeRequest {
2146 const METHOD: &'static str = "conversations.setPurpose";
2147 type Response = ConversationsSetPurposeResponse;
2148}
2149
2150#[doc(alias = "conversations.setPurpose")]
2152#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2153pub struct ConversationsSetPurposeResponse {
2154 #[serde(
2155 default,
2156 deserialize_with = "crate::de::opt_string",
2157 skip_serializing_if = "Option::is_none"
2158 )]
2159 pub purpose: Option<String>,
2160 #[serde(
2161 default,
2162 deserialize_with = "crate::de::opt_object",
2163 skip_serializing_if = "Option::is_none"
2164 )]
2165 pub response_metadata: Option<ResponseMetadata>,
2166 #[serde(
2167 default,
2168 deserialize_with = "crate::de::opt_string",
2169 skip_serializing_if = "Option::is_none"
2170 )]
2171 pub warning: Option<String>,
2172}
2173
2174#[doc(alias = "conversations.setTopic")]
2178#[derive(Debug, Clone, PartialEq, Serialize)]
2179#[non_exhaustive]
2180pub struct ConversationsSetTopicRequest {
2181 pub channel: String,
2183 pub topic: String,
2185}
2186
2187impl ConversationsSetTopicRequest {
2188 pub fn new(channel: impl Into<String>, topic: impl Into<String>) -> Self {
2189 Self {
2190 channel: channel.into(),
2191 topic: topic.into(),
2192 }
2193 }
2194}
2195
2196impl SlackApiMethod for ConversationsSetTopicRequest {
2197 const METHOD: &'static str = "conversations.setTopic";
2198 type Response = ConversationsSetTopicResponse;
2199}
2200
2201#[doc(alias = "conversations.setTopic")]
2203#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2204pub struct ConversationsSetTopicResponse {
2205 #[serde(
2206 default,
2207 deserialize_with = "crate::de::opt_object",
2208 skip_serializing_if = "Option::is_none"
2209 )]
2210 pub channel: Option<Conversation>,
2211 #[serde(
2212 default,
2213 deserialize_with = "crate::de::opt_object",
2214 skip_serializing_if = "Option::is_none"
2215 )]
2216 pub response_metadata: Option<ResponseMetadata>,
2217 #[serde(
2218 default,
2219 deserialize_with = "crate::de::opt_string",
2220 skip_serializing_if = "Option::is_none"
2221 )]
2222 pub warning: Option<String>,
2223}
2224
2225#[doc(alias = "conversations.unarchive")]
2229#[derive(Debug, Clone, PartialEq, Serialize)]
2230#[non_exhaustive]
2231pub struct ConversationsUnarchiveRequest {
2232 pub channel: String,
2234}
2235
2236impl ConversationsUnarchiveRequest {
2237 pub fn new(channel: impl Into<String>) -> Self {
2238 Self {
2239 channel: channel.into(),
2240 }
2241 }
2242}
2243
2244impl SlackApiMethod for ConversationsUnarchiveRequest {
2245 const METHOD: &'static str = "conversations.unarchive";
2246 type Response = ConversationsUnarchiveResponse;
2247}
2248
2249#[doc(alias = "conversations.unarchive")]
2251#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2252pub struct ConversationsUnarchiveResponse {
2253 #[serde(flatten)]
2255 pub extra: serde_json::Map<String, serde_json::Value>,
2256 #[serde(
2257 default,
2258 deserialize_with = "crate::de::opt_object",
2259 skip_serializing_if = "Option::is_none"
2260 )]
2261 pub response_metadata: Option<ResponseMetadata>,
2262 #[serde(
2263 default,
2264 deserialize_with = "crate::de::opt_string",
2265 skip_serializing_if = "Option::is_none"
2266 )]
2267 pub warning: Option<String>,
2268}
2269
2270impl SlackClient {
2271 #[doc(alias = "conversations.acceptSharedInvite")]
2283 pub async fn conversations_accept_shared_invite(
2284 &self,
2285 request: &ConversationsAcceptSharedInviteRequest,
2286 ) -> Result<ConversationsAcceptSharedInviteResponse, SlackError> {
2287 self.call(request).await
2288 }
2289
2290 #[doc(alias = "conversations.approveSharedInvite")]
2302 pub async fn conversations_approve_shared_invite(
2303 &self,
2304 request: &ConversationsApproveSharedInviteRequest,
2305 ) -> Result<ConversationsApproveSharedInviteResponse, SlackError> {
2306 self.call(request).await
2307 }
2308
2309 #[doc(alias = "conversations.archive")]
2322 pub async fn conversations_archive(
2323 &self,
2324 request: &ConversationsArchiveRequest,
2325 ) -> Result<ConversationsArchiveResponse, SlackError> {
2326 self.call(request).await
2327 }
2328
2329 #[doc(alias = "conversations.canvases.create")]
2342 pub async fn conversations_canvases_create(
2343 &self,
2344 request: &ConversationsCanvasesCreateRequest,
2345 ) -> Result<ConversationsCanvasesCreateResponse, SlackError> {
2346 self.call(request).await
2347 }
2348
2349 #[doc(alias = "conversations.close")]
2362 pub async fn conversations_close(
2363 &self,
2364 request: &ConversationsCloseRequest,
2365 ) -> Result<ConversationsCloseResponse, SlackError> {
2366 self.call(request).await
2367 }
2368
2369 #[doc(alias = "conversations.create")]
2382 pub async fn conversations_create(
2383 &self,
2384 request: &ConversationsCreateRequest,
2385 ) -> Result<ConversationsCreateResponse, SlackError> {
2386 self.call(request).await
2387 }
2388
2389 #[doc(alias = "conversations.declineSharedInvite")]
2401 pub async fn conversations_decline_shared_invite(
2402 &self,
2403 request: &ConversationsDeclineSharedInviteRequest,
2404 ) -> Result<ConversationsDeclineSharedInviteResponse, SlackError> {
2405 self.call(request).await
2406 }
2407
2408 #[doc(alias = "conversations.externalInvitePermissions.set")]
2420 pub async fn conversations_external_invite_permissions_set(
2421 &self,
2422 request: &ConversationsExternalInvitePermissionsSetRequest,
2423 ) -> Result<ConversationsExternalInvitePermissionsSetResponse, SlackError> {
2424 self.call(request).await
2425 }
2426
2427 #[doc(alias = "conversations.history")]
2440 pub async fn conversations_history(
2441 &self,
2442 request: &ConversationsHistoryRequest,
2443 ) -> Result<ConversationsHistoryResponse, SlackError> {
2444 self.call(request).await
2445 }
2446
2447 #[doc(alias = "conversations.info")]
2460 pub async fn conversations_info(
2461 &self,
2462 request: &ConversationsInfoRequest,
2463 ) -> Result<ConversationsInfoResponse, SlackError> {
2464 self.call(request).await
2465 }
2466
2467 #[doc(alias = "conversations.invite")]
2480 pub async fn conversations_invite(
2481 &self,
2482 request: &ConversationsInviteRequest,
2483 ) -> Result<ConversationsInviteResponse, SlackError> {
2484 self.call(request).await
2485 }
2486
2487 #[doc(alias = "conversations.inviteShared")]
2499 pub async fn conversations_invite_shared(
2500 &self,
2501 request: &ConversationsInviteSharedRequest,
2502 ) -> Result<ConversationsInviteSharedResponse, SlackError> {
2503 self.call(request).await
2504 }
2505
2506 #[doc(alias = "conversations.join")]
2519 pub async fn conversations_join(
2520 &self,
2521 request: &ConversationsJoinRequest,
2522 ) -> Result<ConversationsJoinResponse, SlackError> {
2523 self.call(request).await
2524 }
2525
2526 #[doc(alias = "conversations.kick")]
2539 pub async fn conversations_kick(
2540 &self,
2541 request: &ConversationsKickRequest,
2542 ) -> Result<ConversationsKickResponse, SlackError> {
2543 self.call(request).await
2544 }
2545
2546 #[doc(alias = "conversations.leave")]
2559 pub async fn conversations_leave(
2560 &self,
2561 request: &ConversationsLeaveRequest,
2562 ) -> Result<ConversationsLeaveResponse, SlackError> {
2563 self.call(request).await
2564 }
2565
2566 #[doc(alias = "conversations.list")]
2579 pub async fn conversations_list(
2580 &self,
2581 request: &ConversationsListRequest,
2582 ) -> Result<ConversationsListResponse, SlackError> {
2583 self.call(request).await
2584 }
2585
2586 #[doc(alias = "conversations.listConnectInvites")]
2598 pub async fn conversations_list_connect_invites(
2599 &self,
2600 request: &ConversationsListConnectInvitesRequest,
2601 ) -> Result<ConversationsListConnectInvitesResponse, SlackError> {
2602 self.call(request).await
2603 }
2604
2605 #[doc(alias = "conversations.mark")]
2618 pub async fn conversations_mark(
2619 &self,
2620 request: &ConversationsMarkRequest,
2621 ) -> Result<ConversationsMarkResponse, SlackError> {
2622 self.call(request).await
2623 }
2624
2625 #[doc(alias = "conversations.members")]
2638 pub async fn conversations_members(
2639 &self,
2640 request: &ConversationsMembersRequest,
2641 ) -> Result<ConversationsMembersResponse, SlackError> {
2642 self.call(request).await
2643 }
2644
2645 #[doc(alias = "conversations.open")]
2658 pub async fn conversations_open(
2659 &self,
2660 request: &ConversationsOpenRequest,
2661 ) -> Result<ConversationsOpenResponse, SlackError> {
2662 self.call(request).await
2663 }
2664
2665 #[doc(alias = "conversations.rename")]
2678 pub async fn conversations_rename(
2679 &self,
2680 request: &ConversationsRenameRequest,
2681 ) -> Result<ConversationsRenameResponse, SlackError> {
2682 self.call(request).await
2683 }
2684
2685 #[doc(alias = "conversations.replies")]
2698 pub async fn conversations_replies(
2699 &self,
2700 request: &ConversationsRepliesRequest,
2701 ) -> Result<ConversationsRepliesResponse, SlackError> {
2702 self.call(request).await
2703 }
2704
2705 #[doc(alias = "conversations.requestSharedInvite.approve")]
2717 pub async fn conversations_request_shared_invite_approve(
2718 &self,
2719 request: &ConversationsRequestSharedInviteApproveRequest,
2720 ) -> Result<ConversationsRequestSharedInviteApproveResponse, SlackError> {
2721 self.call(request).await
2722 }
2723
2724 #[doc(alias = "conversations.requestSharedInvite.deny")]
2736 pub async fn conversations_request_shared_invite_deny(
2737 &self,
2738 request: &ConversationsRequestSharedInviteDenyRequest,
2739 ) -> Result<ConversationsRequestSharedInviteDenyResponse, SlackError> {
2740 self.call(request).await
2741 }
2742
2743 #[doc(alias = "conversations.requestSharedInvite.list")]
2755 pub async fn conversations_request_shared_invite_list(
2756 &self,
2757 request: &ConversationsRequestSharedInviteListRequest,
2758 ) -> Result<ConversationsRequestSharedInviteListResponse, SlackError> {
2759 self.call(request).await
2760 }
2761
2762 #[doc(alias = "conversations.setPurpose")]
2775 pub async fn conversations_set_purpose(
2776 &self,
2777 request: &ConversationsSetPurposeRequest,
2778 ) -> Result<ConversationsSetPurposeResponse, SlackError> {
2779 self.call(request).await
2780 }
2781
2782 #[doc(alias = "conversations.setTopic")]
2795 pub async fn conversations_set_topic(
2796 &self,
2797 request: &ConversationsSetTopicRequest,
2798 ) -> Result<ConversationsSetTopicResponse, SlackError> {
2799 self.call(request).await
2800 }
2801
2802 #[doc(alias = "conversations.unarchive")]
2815 pub async fn conversations_unarchive(
2816 &self,
2817 request: &ConversationsUnarchiveRequest,
2818 ) -> Result<ConversationsUnarchiveResponse, SlackError> {
2819 self.call(request).await
2820 }
2821}