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 = "apps.activities.list")]
15#[derive(Debug, Clone, PartialEq, Serialize)]
16#[non_exhaustive]
17pub struct AppsActivitiesListRequest {
18 pub app_id: String,
20 #[serde(skip_serializing_if = "Option::is_none")]
22 pub team_id: Option<String>,
23 #[serde(skip_serializing_if = "Option::is_none")]
25 pub cursor: Option<String>,
26 #[serde(skip_serializing_if = "Option::is_none")]
28 pub limit: Option<i64>,
29 #[serde(skip_serializing_if = "Option::is_none")]
31 pub min_log_level: Option<String>,
32 #[serde(skip_serializing_if = "Option::is_none")]
34 pub log_event_type: Option<String>,
35 #[serde(skip_serializing_if = "Option::is_none")]
37 pub source: Option<String>,
38 #[serde(skip_serializing_if = "Option::is_none")]
40 pub component_type: Option<String>,
41 #[serde(skip_serializing_if = "Option::is_none")]
43 pub component_id: Option<String>,
44 #[serde(skip_serializing_if = "Option::is_none")]
46 pub trace_id: Option<String>,
47 #[serde(skip_serializing_if = "Option::is_none")]
49 pub min_date_created: Option<i64>,
50 #[serde(skip_serializing_if = "Option::is_none")]
52 pub max_date_created: Option<i64>,
53 #[serde(skip_serializing_if = "Option::is_none")]
55 pub sort_direction: Option<String>,
56}
57
58impl AppsActivitiesListRequest {
59 pub fn new(app_id: impl Into<String>) -> Self {
60 Self {
61 app_id: app_id.into(),
62 team_id: None,
63 cursor: None,
64 limit: None,
65 min_log_level: None,
66 log_event_type: None,
67 source: None,
68 component_type: None,
69 component_id: None,
70 trace_id: None,
71 min_date_created: None,
72 max_date_created: None,
73 sort_direction: None,
74 }
75 }
76
77 pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
78 self.team_id = Some(team_id.into());
79 self
80 }
81
82 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
83 self.cursor = Some(cursor.into());
84 self
85 }
86
87 pub fn limit(mut self, limit: i64) -> Self {
88 self.limit = Some(limit);
89 self
90 }
91
92 pub fn min_log_level(mut self, min_log_level: impl Into<String>) -> Self {
93 self.min_log_level = Some(min_log_level.into());
94 self
95 }
96
97 pub fn log_event_type(mut self, log_event_type: impl Into<String>) -> Self {
98 self.log_event_type = Some(log_event_type.into());
99 self
100 }
101
102 pub fn source(mut self, source: impl Into<String>) -> Self {
103 self.source = Some(source.into());
104 self
105 }
106
107 pub fn component_type(mut self, component_type: impl Into<String>) -> Self {
108 self.component_type = Some(component_type.into());
109 self
110 }
111
112 pub fn component_id(mut self, component_id: impl Into<String>) -> Self {
113 self.component_id = Some(component_id.into());
114 self
115 }
116
117 pub fn trace_id(mut self, trace_id: impl Into<String>) -> Self {
118 self.trace_id = Some(trace_id.into());
119 self
120 }
121
122 pub fn min_date_created(mut self, min_date_created: i64) -> Self {
123 self.min_date_created = Some(min_date_created);
124 self
125 }
126
127 pub fn max_date_created(mut self, max_date_created: i64) -> Self {
128 self.max_date_created = Some(max_date_created);
129 self
130 }
131
132 pub fn sort_direction(mut self, sort_direction: impl Into<String>) -> Self {
133 self.sort_direction = Some(sort_direction.into());
134 self
135 }
136}
137
138impl SlackApiMethod for AppsActivitiesListRequest {
139 const METHOD: &'static str = "apps.activities.list";
140 type Response = AppsActivitiesListResponse;
141}
142
143impl CursorPaginated for AppsActivitiesListRequest {
144 fn set_cursor(&mut self, cursor: String) {
145 self.cursor = Some(cursor);
146 }
147}
148
149impl NextCursor for AppsActivitiesListResponse {
150 fn next_cursor(&self) -> Option<&str> {
151 self.response_metadata.as_ref()?.next_cursor.as_deref()
152 }
153}
154
155#[doc(alias = "apps.activities.list")]
157#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
158pub struct AppsActivitiesListResponse {
159 #[serde(
160 default,
161 deserialize_with = "crate::de::vec",
162 skip_serializing_if = "Vec::is_empty"
163 )]
164 pub activities: Vec<AppsActivitiesListResponseActivities>,
165 #[serde(
166 default,
167 deserialize_with = "crate::de::opt_object",
168 skip_serializing_if = "Option::is_none"
169 )]
170 pub response_metadata: Option<ResponseMetadata>,
171 #[serde(
172 default,
173 deserialize_with = "crate::de::opt_string",
174 skip_serializing_if = "Option::is_none"
175 )]
176 pub warning: Option<String>,
177}
178
179#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
180pub struct AppsActivitiesListResponseActivities {
181 #[serde(
182 default,
183 deserialize_with = "crate::de::opt_string",
184 skip_serializing_if = "Option::is_none"
185 )]
186 pub level: Option<String>,
187 #[serde(
188 default,
189 deserialize_with = "crate::de::opt_string",
190 skip_serializing_if = "Option::is_none"
191 )]
192 pub event_type: Option<String>,
193 #[serde(
194 default,
195 deserialize_with = "crate::de::opt_string",
196 skip_serializing_if = "Option::is_none"
197 )]
198 pub source: Option<String>,
199 #[serde(
200 default,
201 deserialize_with = "crate::de::opt_string",
202 skip_serializing_if = "Option::is_none"
203 )]
204 pub component_type: Option<String>,
205 #[serde(
206 default,
207 deserialize_with = "crate::de::opt_string",
208 skip_serializing_if = "Option::is_none"
209 )]
210 pub component_id: Option<String>,
211 #[serde(
212 default,
213 deserialize_with = "crate::de::opt_object",
214 skip_serializing_if = "Option::is_none"
215 )]
216 pub payload: Option<AppsActivitiesListResponseActivitiesPayload>,
217 #[serde(
218 default,
219 deserialize_with = "crate::de::opt_i64",
220 skip_serializing_if = "Option::is_none"
221 )]
222 pub created: Option<i64>,
223 #[serde(
224 default,
225 deserialize_with = "crate::de::opt_string",
226 skip_serializing_if = "Option::is_none"
227 )]
228 pub trace_id: Option<String>,
229}
230
231#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
232pub struct AppsActivitiesListResponseActivitiesPayload {
233 #[serde(
234 default,
235 deserialize_with = "crate::de::opt_string",
236 skip_serializing_if = "Option::is_none"
237 )]
238 pub function_name: Option<String>,
239 #[serde(
240 default,
241 deserialize_with = "crate::de::opt_string",
242 skip_serializing_if = "Option::is_none"
243 )]
244 pub function_type: Option<String>,
245}
246
247#[doc(alias = "apps.auth.external.delete")]
251#[derive(Debug, Clone, PartialEq, Serialize, Default)]
252#[non_exhaustive]
253pub struct AppsAuthExternalDeleteRequest {
254 #[serde(skip_serializing_if = "Option::is_none")]
256 pub app_id: Option<String>,
257 #[serde(skip_serializing_if = "Option::is_none")]
259 pub provider_key: Option<String>,
260 #[serde(skip_serializing_if = "Option::is_none")]
262 pub external_token_id: Option<String>,
263}
264
265impl AppsAuthExternalDeleteRequest {
266 pub fn new() -> Self {
267 Self {
268 app_id: None,
269 provider_key: None,
270 external_token_id: None,
271 }
272 }
273
274 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
275 self.app_id = Some(app_id.into());
276 self
277 }
278
279 pub fn provider_key(mut self, provider_key: impl Into<String>) -> Self {
280 self.provider_key = Some(provider_key.into());
281 self
282 }
283
284 pub fn external_token_id(mut self, external_token_id: impl Into<String>) -> Self {
285 self.external_token_id = Some(external_token_id.into());
286 self
287 }
288}
289
290impl SlackApiMethod for AppsAuthExternalDeleteRequest {
291 const METHOD: &'static str = "apps.auth.external.delete";
292 type Response = AppsAuthExternalDeleteResponse;
293}
294
295#[doc(alias = "apps.auth.external.delete")]
297#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
298pub struct AppsAuthExternalDeleteResponse {
299 #[serde(flatten)]
301 pub extra: serde_json::Map<String, serde_json::Value>,
302 #[serde(
303 default,
304 deserialize_with = "crate::de::opt_object",
305 skip_serializing_if = "Option::is_none"
306 )]
307 pub response_metadata: Option<ResponseMetadata>,
308 #[serde(
309 default,
310 deserialize_with = "crate::de::opt_string",
311 skip_serializing_if = "Option::is_none"
312 )]
313 pub warning: Option<String>,
314}
315
316#[doc(alias = "apps.auth.external.get")]
320#[derive(Debug, Clone, PartialEq, Serialize)]
321#[non_exhaustive]
322pub struct AppsAuthExternalGetRequest {
323 pub external_token_id: String,
325 #[serde(skip_serializing_if = "Option::is_none")]
327 pub force_refresh: Option<bool>,
328}
329
330impl AppsAuthExternalGetRequest {
331 pub fn new(external_token_id: impl Into<String>) -> Self {
332 Self {
333 external_token_id: external_token_id.into(),
334 force_refresh: None,
335 }
336 }
337
338 pub fn force_refresh(mut self, force_refresh: bool) -> Self {
339 self.force_refresh = Some(force_refresh);
340 self
341 }
342}
343
344impl SlackApiMethod for AppsAuthExternalGetRequest {
345 const METHOD: &'static str = "apps.auth.external.get";
346 type Response = AppsAuthExternalGetResponse;
347}
348
349#[doc(alias = "apps.auth.external.get")]
351#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
352pub struct AppsAuthExternalGetResponse {
353 #[serde(
354 default,
355 deserialize_with = "crate::de::opt_string",
356 skip_serializing_if = "Option::is_none"
357 )]
358 pub external_token: Option<String>,
359 #[serde(
360 default,
361 deserialize_with = "crate::de::opt_object",
362 skip_serializing_if = "Option::is_none"
363 )]
364 pub response_metadata: Option<ResponseMetadata>,
365 #[serde(
366 default,
367 deserialize_with = "crate::de::opt_string",
368 skip_serializing_if = "Option::is_none"
369 )]
370 pub warning: Option<String>,
371}
372
373#[doc(alias = "apps.connections.open")]
377#[derive(Debug, Clone, PartialEq, Serialize, Default)]
378#[non_exhaustive]
379pub struct AppsConnectionsOpenRequest {}
380
381impl AppsConnectionsOpenRequest {
382 pub fn new() -> Self {
383 Self {}
384 }
385}
386
387impl SlackApiMethod for AppsConnectionsOpenRequest {
388 const METHOD: &'static str = "apps.connections.open";
389 type Response = AppsConnectionsOpenResponse;
390}
391
392#[doc(alias = "apps.connections.open")]
394#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
395pub struct AppsConnectionsOpenResponse {
396 #[serde(
397 default,
398 deserialize_with = "crate::de::opt_string",
399 skip_serializing_if = "Option::is_none"
400 )]
401 pub url: Option<String>,
402 #[serde(
403 default,
404 deserialize_with = "crate::de::opt_object",
405 skip_serializing_if = "Option::is_none"
406 )]
407 pub response_metadata: Option<ResponseMetadata>,
408 #[serde(
409 default,
410 deserialize_with = "crate::de::opt_string",
411 skip_serializing_if = "Option::is_none"
412 )]
413 pub warning: Option<String>,
414}
415
416#[doc(alias = "apps.datastore.bulkDelete")]
420#[derive(Debug, Clone, PartialEq, Serialize)]
421#[non_exhaustive]
422pub struct AppsDatastoreBulkDeleteRequest {
423 pub datastore: String,
425 #[serde(serialize_with = "crate::form::as_json")]
427 pub ids: Vec<String>,
428 #[serde(skip_serializing_if = "Option::is_none")]
429 pub app_id: Option<String>,
430}
431
432impl AppsDatastoreBulkDeleteRequest {
433 pub fn new(datastore: impl Into<String>, ids: Vec<String>) -> Self {
434 Self {
435 datastore: datastore.into(),
436 ids,
437 app_id: None,
438 }
439 }
440
441 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
442 self.app_id = Some(app_id.into());
443 self
444 }
445}
446
447impl SlackApiMethod for AppsDatastoreBulkDeleteRequest {
448 const METHOD: &'static str = "apps.datastore.bulkDelete";
449 type Response = AppsDatastoreBulkDeleteResponse;
450}
451
452#[doc(alias = "apps.datastore.bulkDelete")]
454#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
455pub struct AppsDatastoreBulkDeleteResponse {
456 #[serde(
457 default,
458 deserialize_with = "crate::de::vec",
459 skip_serializing_if = "Vec::is_empty"
460 )]
461 pub failed_items: Vec<serde_json::Value>,
462 #[serde(
463 default,
464 deserialize_with = "crate::de::opt_object",
465 skip_serializing_if = "Option::is_none"
466 )]
467 pub response_metadata: Option<ResponseMetadata>,
468 #[serde(
469 default,
470 deserialize_with = "crate::de::opt_string",
471 skip_serializing_if = "Option::is_none"
472 )]
473 pub warning: Option<String>,
474}
475
476#[doc(alias = "apps.datastore.bulkGet")]
480#[derive(Debug, Clone, PartialEq, Serialize)]
481#[non_exhaustive]
482pub struct AppsDatastoreBulkGetRequest {
483 pub datastore: String,
485 #[serde(serialize_with = "crate::form::as_json")]
487 pub ids: Vec<String>,
488 #[serde(skip_serializing_if = "Option::is_none")]
489 pub app_id: Option<String>,
490}
491
492impl AppsDatastoreBulkGetRequest {
493 pub fn new(datastore: impl Into<String>, ids: Vec<String>) -> Self {
494 Self {
495 datastore: datastore.into(),
496 ids,
497 app_id: None,
498 }
499 }
500
501 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
502 self.app_id = Some(app_id.into());
503 self
504 }
505}
506
507impl SlackApiMethod for AppsDatastoreBulkGetRequest {
508 const METHOD: &'static str = "apps.datastore.bulkGet";
509 type Response = AppsDatastoreBulkGetResponse;
510}
511
512#[doc(alias = "apps.datastore.bulkGet")]
514#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
515pub struct AppsDatastoreBulkGetResponse {
516 #[serde(
517 default,
518 deserialize_with = "crate::de::opt_string",
519 skip_serializing_if = "Option::is_none"
520 )]
521 pub datastore: Option<String>,
522 #[serde(
523 default,
524 deserialize_with = "crate::de::vec",
525 skip_serializing_if = "Vec::is_empty"
526 )]
527 pub items: Vec<serde_json::Map<String, serde_json::Value>>,
528 #[serde(
529 default,
530 deserialize_with = "crate::de::opt_object",
531 skip_serializing_if = "Option::is_none"
532 )]
533 pub response_metadata: Option<ResponseMetadata>,
534 #[serde(
535 default,
536 deserialize_with = "crate::de::opt_string",
537 skip_serializing_if = "Option::is_none"
538 )]
539 pub warning: Option<String>,
540}
541
542#[doc(alias = "apps.datastore.bulkPut")]
546#[derive(Debug, Clone, PartialEq, Serialize)]
547#[non_exhaustive]
548pub struct AppsDatastoreBulkPutRequest {
549 pub datastore: String,
551 #[serde(serialize_with = "crate::form::as_json")]
553 pub items: Vec<serde_json::Value>,
554 #[serde(skip_serializing_if = "Option::is_none")]
555 pub app_id: Option<String>,
556}
557
558impl AppsDatastoreBulkPutRequest {
559 pub fn new(datastore: impl Into<String>, items: Vec<serde_json::Value>) -> Self {
560 Self {
561 datastore: datastore.into(),
562 items,
563 app_id: None,
564 }
565 }
566
567 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
568 self.app_id = Some(app_id.into());
569 self
570 }
571}
572
573impl SlackApiMethod for AppsDatastoreBulkPutRequest {
574 const METHOD: &'static str = "apps.datastore.bulkPut";
575 type Response = AppsDatastoreBulkPutResponse;
576}
577
578#[doc(alias = "apps.datastore.bulkPut")]
580#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
581pub struct AppsDatastoreBulkPutResponse {
582 #[serde(
583 default,
584 deserialize_with = "crate::de::opt_string",
585 skip_serializing_if = "Option::is_none"
586 )]
587 pub datastore: Option<String>,
588 #[serde(
589 default,
590 deserialize_with = "crate::de::vec",
591 skip_serializing_if = "Vec::is_empty"
592 )]
593 pub failed_items: Vec<serde_json::Value>,
594 #[serde(
595 default,
596 deserialize_with = "crate::de::opt_object",
597 skip_serializing_if = "Option::is_none"
598 )]
599 pub response_metadata: Option<ResponseMetadata>,
600 #[serde(
601 default,
602 deserialize_with = "crate::de::opt_string",
603 skip_serializing_if = "Option::is_none"
604 )]
605 pub warning: Option<String>,
606}
607
608#[doc(alias = "apps.datastore.count")]
612#[derive(Debug, Clone, PartialEq, Serialize)]
613#[non_exhaustive]
614pub struct AppsDatastoreCountRequest {
615 pub datastore: String,
617 #[serde(skip_serializing_if = "Option::is_none")]
619 pub expression: Option<String>,
620 #[serde(skip_serializing_if = "Option::is_none")]
622 pub expression_attributes: Option<serde_json::Value>,
623 #[serde(skip_serializing_if = "Option::is_none")]
625 pub expression_values: Option<serde_json::Value>,
626 #[serde(skip_serializing_if = "Option::is_none")]
628 pub app_id: Option<String>,
629}
630
631impl AppsDatastoreCountRequest {
632 pub fn new(datastore: impl Into<String>) -> Self {
633 Self {
634 datastore: datastore.into(),
635 expression: None,
636 expression_attributes: None,
637 expression_values: None,
638 app_id: None,
639 }
640 }
641
642 pub fn expression(mut self, expression: impl Into<String>) -> Self {
643 self.expression = Some(expression.into());
644 self
645 }
646
647 pub fn expression_attributes(mut self, expression_attributes: serde_json::Value) -> Self {
648 self.expression_attributes = Some(expression_attributes);
649 self
650 }
651
652 pub fn expression_values(mut self, expression_values: serde_json::Value) -> Self {
653 self.expression_values = Some(expression_values);
654 self
655 }
656
657 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
658 self.app_id = Some(app_id.into());
659 self
660 }
661}
662
663impl SlackApiMethod for AppsDatastoreCountRequest {
664 const METHOD: &'static str = "apps.datastore.count";
665 type Response = AppsDatastoreCountResponse;
666}
667
668#[doc(alias = "apps.datastore.count")]
670#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
671pub struct AppsDatastoreCountResponse {
672 #[serde(
673 default,
674 deserialize_with = "crate::de::opt_string",
675 skip_serializing_if = "Option::is_none"
676 )]
677 pub datastore: Option<String>,
678 #[serde(
679 default,
680 deserialize_with = "crate::de::opt_i64",
681 skip_serializing_if = "Option::is_none"
682 )]
683 pub count: Option<i64>,
684 #[serde(
685 default,
686 deserialize_with = "crate::de::opt_object",
687 skip_serializing_if = "Option::is_none"
688 )]
689 pub response_metadata: Option<ResponseMetadata>,
690 #[serde(
691 default,
692 deserialize_with = "crate::de::opt_string",
693 skip_serializing_if = "Option::is_none"
694 )]
695 pub warning: Option<String>,
696}
697
698#[doc(alias = "apps.datastore.delete")]
702#[derive(Debug, Clone, PartialEq, Serialize)]
703#[non_exhaustive]
704pub struct AppsDatastoreDeleteRequest {
705 pub datastore: String,
707 pub id: String,
709 #[serde(skip_serializing_if = "Option::is_none")]
710 pub app_id: Option<String>,
711}
712
713impl AppsDatastoreDeleteRequest {
714 pub fn new(datastore: impl Into<String>, id: impl Into<String>) -> Self {
715 Self {
716 datastore: datastore.into(),
717 id: id.into(),
718 app_id: None,
719 }
720 }
721
722 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
723 self.app_id = Some(app_id.into());
724 self
725 }
726}
727
728impl SlackApiMethod for AppsDatastoreDeleteRequest {
729 const METHOD: &'static str = "apps.datastore.delete";
730 type Response = AppsDatastoreDeleteResponse;
731}
732
733#[doc(alias = "apps.datastore.delete")]
735#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
736pub struct AppsDatastoreDeleteResponse {
737 #[serde(flatten)]
739 pub extra: serde_json::Map<String, serde_json::Value>,
740 #[serde(
741 default,
742 deserialize_with = "crate::de::opt_object",
743 skip_serializing_if = "Option::is_none"
744 )]
745 pub response_metadata: Option<ResponseMetadata>,
746 #[serde(
747 default,
748 deserialize_with = "crate::de::opt_string",
749 skip_serializing_if = "Option::is_none"
750 )]
751 pub warning: Option<String>,
752}
753
754#[doc(alias = "apps.datastore.get")]
758#[derive(Debug, Clone, PartialEq, Serialize)]
759#[non_exhaustive]
760pub struct AppsDatastoreGetRequest {
761 pub datastore: String,
763 pub id: String,
765 #[serde(skip_serializing_if = "Option::is_none")]
766 pub app_id: Option<String>,
767}
768
769impl AppsDatastoreGetRequest {
770 pub fn new(datastore: impl Into<String>, id: impl Into<String>) -> Self {
771 Self {
772 datastore: datastore.into(),
773 id: id.into(),
774 app_id: None,
775 }
776 }
777
778 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
779 self.app_id = Some(app_id.into());
780 self
781 }
782}
783
784impl SlackApiMethod for AppsDatastoreGetRequest {
785 const METHOD: &'static str = "apps.datastore.get";
786 type Response = AppsDatastoreGetResponse;
787}
788
789#[doc(alias = "apps.datastore.get")]
791#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
792pub struct AppsDatastoreGetResponse {
793 #[serde(
794 default,
795 deserialize_with = "crate::de::opt_string",
796 skip_serializing_if = "Option::is_none"
797 )]
798 pub datastore: Option<String>,
799 #[serde(
800 default,
801 deserialize_with = "crate::de::opt_object",
802 skip_serializing_if = "Option::is_none"
803 )]
804 pub item: Option<serde_json::Map<String, serde_json::Value>>,
805 #[serde(
806 default,
807 deserialize_with = "crate::de::opt_object",
808 skip_serializing_if = "Option::is_none"
809 )]
810 pub response_metadata: Option<ResponseMetadata>,
811 #[serde(
812 default,
813 deserialize_with = "crate::de::opt_string",
814 skip_serializing_if = "Option::is_none"
815 )]
816 pub warning: Option<String>,
817}
818
819#[doc(alias = "apps.datastore.put")]
823#[derive(Debug, Clone, PartialEq, Serialize)]
824#[non_exhaustive]
825pub struct AppsDatastorePutRequest {
826 pub datastore: String,
828 pub item: serde_json::Value,
830 #[serde(skip_serializing_if = "Option::is_none")]
831 pub app_id: Option<String>,
832}
833
834impl AppsDatastorePutRequest {
835 pub fn new(datastore: impl Into<String>, item: serde_json::Value) -> Self {
836 Self {
837 datastore: datastore.into(),
838 item,
839 app_id: None,
840 }
841 }
842
843 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
844 self.app_id = Some(app_id.into());
845 self
846 }
847}
848
849impl SlackApiMethod for AppsDatastorePutRequest {
850 const METHOD: &'static str = "apps.datastore.put";
851 type Response = AppsDatastorePutResponse;
852}
853
854#[doc(alias = "apps.datastore.put")]
856#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
857pub struct AppsDatastorePutResponse {
858 #[serde(
859 default,
860 deserialize_with = "crate::de::opt_string",
861 skip_serializing_if = "Option::is_none"
862 )]
863 pub datastore: Option<String>,
864 #[serde(
865 default,
866 deserialize_with = "crate::de::opt_object",
867 skip_serializing_if = "Option::is_none"
868 )]
869 pub item: Option<serde_json::Map<String, serde_json::Value>>,
870 #[serde(
871 default,
872 deserialize_with = "crate::de::opt_object",
873 skip_serializing_if = "Option::is_none"
874 )]
875 pub response_metadata: Option<ResponseMetadata>,
876 #[serde(
877 default,
878 deserialize_with = "crate::de::opt_string",
879 skip_serializing_if = "Option::is_none"
880 )]
881 pub warning: Option<String>,
882}
883
884#[doc(alias = "apps.datastore.query")]
888#[derive(Debug, Clone, PartialEq, Serialize)]
889#[non_exhaustive]
890pub struct AppsDatastoreQueryRequest {
891 pub datastore: String,
893 #[serde(skip_serializing_if = "Option::is_none")]
895 pub expression: Option<String>,
896 #[serde(skip_serializing_if = "Option::is_none")]
898 pub expression_attributes: Option<serde_json::Value>,
899 #[serde(skip_serializing_if = "Option::is_none")]
901 pub expression_values: Option<serde_json::Value>,
902 #[serde(skip_serializing_if = "Option::is_none")]
904 pub app_id: Option<String>,
905 #[serde(skip_serializing_if = "Option::is_none")]
907 pub cursor: Option<String>,
908 #[serde(skip_serializing_if = "Option::is_none")]
910 pub limit: Option<i64>,
911}
912
913impl AppsDatastoreQueryRequest {
914 pub fn new(datastore: impl Into<String>) -> Self {
915 Self {
916 datastore: datastore.into(),
917 expression: None,
918 expression_attributes: None,
919 expression_values: None,
920 app_id: None,
921 cursor: None,
922 limit: None,
923 }
924 }
925
926 pub fn expression(mut self, expression: impl Into<String>) -> Self {
927 self.expression = Some(expression.into());
928 self
929 }
930
931 pub fn expression_attributes(mut self, expression_attributes: serde_json::Value) -> Self {
932 self.expression_attributes = Some(expression_attributes);
933 self
934 }
935
936 pub fn expression_values(mut self, expression_values: serde_json::Value) -> Self {
937 self.expression_values = Some(expression_values);
938 self
939 }
940
941 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
942 self.app_id = Some(app_id.into());
943 self
944 }
945
946 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
947 self.cursor = Some(cursor.into());
948 self
949 }
950
951 pub fn limit(mut self, limit: i64) -> Self {
952 self.limit = Some(limit);
953 self
954 }
955}
956
957impl SlackApiMethod for AppsDatastoreQueryRequest {
958 const METHOD: &'static str = "apps.datastore.query";
959 type Response = AppsDatastoreQueryResponse;
960}
961
962impl CursorPaginated for AppsDatastoreQueryRequest {
963 fn set_cursor(&mut self, cursor: String) {
964 self.cursor = Some(cursor);
965 }
966}
967
968impl NextCursor for AppsDatastoreQueryResponse {
969 fn next_cursor(&self) -> Option<&str> {
970 self.response_metadata.as_ref()?.next_cursor.as_deref()
971 }
972}
973
974#[doc(alias = "apps.datastore.query")]
976#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
977pub struct AppsDatastoreQueryResponse {
978 #[serde(
979 default,
980 deserialize_with = "crate::de::opt_string",
981 skip_serializing_if = "Option::is_none"
982 )]
983 pub datastore: Option<String>,
984 #[serde(
985 default,
986 deserialize_with = "crate::de::vec",
987 skip_serializing_if = "Vec::is_empty"
988 )]
989 pub items: Vec<serde_json::Map<String, serde_json::Value>>,
990 #[serde(
991 default,
992 deserialize_with = "crate::de::opt_object",
993 skip_serializing_if = "Option::is_none"
994 )]
995 pub response_metadata: Option<ResponseMetadata>,
996 #[serde(
997 default,
998 deserialize_with = "crate::de::opt_string",
999 skip_serializing_if = "Option::is_none"
1000 )]
1001 pub warning: Option<String>,
1002}
1003
1004#[doc(alias = "apps.datastore.update")]
1008#[derive(Debug, Clone, PartialEq, Serialize)]
1009#[non_exhaustive]
1010pub struct AppsDatastoreUpdateRequest {
1011 pub datastore: String,
1013 pub item: serde_json::Value,
1015 #[serde(skip_serializing_if = "Option::is_none")]
1016 pub app_id: Option<String>,
1017}
1018
1019impl AppsDatastoreUpdateRequest {
1020 pub fn new(datastore: impl Into<String>, item: serde_json::Value) -> Self {
1021 Self {
1022 datastore: datastore.into(),
1023 item,
1024 app_id: None,
1025 }
1026 }
1027
1028 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
1029 self.app_id = Some(app_id.into());
1030 self
1031 }
1032}
1033
1034impl SlackApiMethod for AppsDatastoreUpdateRequest {
1035 const METHOD: &'static str = "apps.datastore.update";
1036 type Response = AppsDatastoreUpdateResponse;
1037}
1038
1039#[doc(alias = "apps.datastore.update")]
1041#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1042pub struct AppsDatastoreUpdateResponse {
1043 #[serde(
1044 default,
1045 deserialize_with = "crate::de::opt_string",
1046 skip_serializing_if = "Option::is_none"
1047 )]
1048 pub datastore: Option<String>,
1049 #[serde(
1050 default,
1051 deserialize_with = "crate::de::opt_object",
1052 skip_serializing_if = "Option::is_none"
1053 )]
1054 pub item: Option<serde_json::Map<String, serde_json::Value>>,
1055 #[serde(
1056 default,
1057 deserialize_with = "crate::de::opt_object",
1058 skip_serializing_if = "Option::is_none"
1059 )]
1060 pub response_metadata: Option<ResponseMetadata>,
1061 #[serde(
1062 default,
1063 deserialize_with = "crate::de::opt_string",
1064 skip_serializing_if = "Option::is_none"
1065 )]
1066 pub warning: Option<String>,
1067}
1068
1069#[doc(alias = "apps.event.authorizations.list")]
1073#[derive(Debug, Clone, PartialEq, Serialize)]
1074#[non_exhaustive]
1075pub struct AppsEventAuthorizationsListRequest {
1076 pub event_context: String,
1077 #[serde(skip_serializing_if = "Option::is_none")]
1078 pub cursor: Option<String>,
1079 #[serde(skip_serializing_if = "Option::is_none")]
1080 pub limit: Option<i64>,
1081}
1082
1083impl AppsEventAuthorizationsListRequest {
1084 pub fn new(event_context: impl Into<String>) -> Self {
1085 Self {
1086 event_context: event_context.into(),
1087 cursor: None,
1088 limit: None,
1089 }
1090 }
1091
1092 pub fn cursor(mut self, cursor: impl Into<String>) -> Self {
1093 self.cursor = Some(cursor.into());
1094 self
1095 }
1096
1097 pub fn limit(mut self, limit: i64) -> Self {
1098 self.limit = Some(limit);
1099 self
1100 }
1101}
1102
1103impl SlackApiMethod for AppsEventAuthorizationsListRequest {
1104 const METHOD: &'static str = "apps.event.authorizations.list";
1105 type Response = AppsEventAuthorizationsListResponse;
1106}
1107
1108impl CursorPaginated for AppsEventAuthorizationsListRequest {
1109 fn set_cursor(&mut self, cursor: String) {
1110 self.cursor = Some(cursor);
1111 }
1112}
1113
1114impl NextCursor for AppsEventAuthorizationsListResponse {
1115 fn next_cursor(&self) -> Option<&str> {
1116 self.response_metadata.as_ref()?.next_cursor.as_deref()
1117 }
1118}
1119
1120#[doc(alias = "apps.event.authorizations.list")]
1122#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1123pub struct AppsEventAuthorizationsListResponse {
1124 #[serde(
1125 default,
1126 deserialize_with = "crate::de::vec",
1127 skip_serializing_if = "Vec::is_empty"
1128 )]
1129 pub authorizations: Vec<AppsEventAuthorizationsListResponseAuthorizations>,
1130 #[serde(
1131 default,
1132 deserialize_with = "crate::de::opt_object",
1133 skip_serializing_if = "Option::is_none"
1134 )]
1135 pub response_metadata: Option<ResponseMetadata>,
1136 #[serde(
1137 default,
1138 deserialize_with = "crate::de::opt_string",
1139 skip_serializing_if = "Option::is_none"
1140 )]
1141 pub warning: Option<String>,
1142}
1143
1144#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1145pub struct AppsEventAuthorizationsListResponseAuthorizations {
1146 #[serde(
1147 default,
1148 deserialize_with = "crate::de::opt_string",
1149 skip_serializing_if = "Option::is_none"
1150 )]
1151 pub enterprise_id: Option<String>,
1152 #[serde(
1153 default,
1154 deserialize_with = "crate::de::opt_string",
1155 skip_serializing_if = "Option::is_none"
1156 )]
1157 pub team_id: Option<String>,
1158 #[serde(
1159 default,
1160 deserialize_with = "crate::de::opt_string",
1161 skip_serializing_if = "Option::is_none"
1162 )]
1163 pub user_id: Option<String>,
1164 #[serde(
1165 default,
1166 deserialize_with = "crate::de::opt_string",
1167 skip_serializing_if = "Option::is_none"
1168 )]
1169 pub is_bot: Option<String>,
1170}
1171
1172#[doc(alias = "apps.icon.set")]
1176#[derive(Debug, Clone, PartialEq, Serialize)]
1177#[non_exhaustive]
1178pub struct AppsIconSetRequest {
1179 pub app_id: String,
1181 #[serde(skip_serializing_if = "Option::is_none")]
1183 pub file: Option<String>,
1184 #[serde(skip_serializing_if = "Option::is_none")]
1186 pub url: Option<String>,
1187}
1188
1189impl AppsIconSetRequest {
1190 pub fn new(app_id: impl Into<String>) -> Self {
1191 Self {
1192 app_id: app_id.into(),
1193 file: None,
1194 url: None,
1195 }
1196 }
1197
1198 pub fn file(mut self, file: impl Into<String>) -> Self {
1199 self.file = Some(file.into());
1200 self
1201 }
1202
1203 pub fn url(mut self, url: impl Into<String>) -> Self {
1204 self.url = Some(url.into());
1205 self
1206 }
1207}
1208
1209impl SlackApiMethod for AppsIconSetRequest {
1210 const METHOD: &'static str = "apps.icon.set";
1211 type Response = AppsIconSetResponse;
1212}
1213
1214#[doc(alias = "apps.icon.set")]
1216#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1217pub struct AppsIconSetResponse {
1218 #[serde(flatten)]
1220 pub extra: serde_json::Map<String, serde_json::Value>,
1221 #[serde(
1222 default,
1223 deserialize_with = "crate::de::opt_object",
1224 skip_serializing_if = "Option::is_none"
1225 )]
1226 pub response_metadata: Option<ResponseMetadata>,
1227 #[serde(
1228 default,
1229 deserialize_with = "crate::de::opt_string",
1230 skip_serializing_if = "Option::is_none"
1231 )]
1232 pub warning: Option<String>,
1233}
1234
1235#[doc(alias = "apps.managed.permissions.set")]
1239#[derive(Debug, Clone, PartialEq, Serialize)]
1240#[non_exhaustive]
1241pub struct AppsManagedPermissionsSetRequest {
1242 pub app_id: String,
1244 pub permissions: String,
1246}
1247
1248impl AppsManagedPermissionsSetRequest {
1249 pub fn new(app_id: impl Into<String>, permissions: impl Into<String>) -> Self {
1250 Self {
1251 app_id: app_id.into(),
1252 permissions: permissions.into(),
1253 }
1254 }
1255}
1256
1257impl SlackApiMethod for AppsManagedPermissionsSetRequest {
1258 const METHOD: &'static str = "apps.managed.permissions.set";
1259 type Response = AppsManagedPermissionsSetResponse;
1260}
1261
1262#[doc(alias = "apps.managed.permissions.set")]
1264#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1265pub struct AppsManagedPermissionsSetResponse {
1266 #[serde(flatten)]
1268 pub extra: serde_json::Map<String, serde_json::Value>,
1269 #[serde(
1270 default,
1271 deserialize_with = "crate::de::opt_object",
1272 skip_serializing_if = "Option::is_none"
1273 )]
1274 pub response_metadata: Option<ResponseMetadata>,
1275 #[serde(
1276 default,
1277 deserialize_with = "crate::de::opt_string",
1278 skip_serializing_if = "Option::is_none"
1279 )]
1280 pub warning: Option<String>,
1281}
1282
1283#[doc(alias = "apps.manifest.create")]
1287#[derive(Debug, Clone, PartialEq, Serialize)]
1288#[non_exhaustive]
1289pub struct AppsManifestCreateRequest {
1290 pub manifest: String,
1292 #[serde(skip_serializing_if = "Option::is_none")]
1294 pub team_id: Option<String>,
1295}
1296
1297impl AppsManifestCreateRequest {
1298 pub fn new(manifest: impl Into<String>) -> Self {
1299 Self {
1300 manifest: manifest.into(),
1301 team_id: None,
1302 }
1303 }
1304
1305 pub fn team_id(mut self, team_id: impl Into<String>) -> Self {
1306 self.team_id = Some(team_id.into());
1307 self
1308 }
1309}
1310
1311impl SlackApiMethod for AppsManifestCreateRequest {
1312 const METHOD: &'static str = "apps.manifest.create";
1313 type Response = AppsManifestCreateResponse;
1314}
1315
1316#[doc(alias = "apps.manifest.create")]
1318#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1319pub struct AppsManifestCreateResponse {
1320 #[serde(
1321 default,
1322 deserialize_with = "crate::de::opt_string",
1323 skip_serializing_if = "Option::is_none"
1324 )]
1325 pub app_id: Option<String>,
1326 #[serde(
1327 default,
1328 deserialize_with = "crate::de::opt_object",
1329 skip_serializing_if = "Option::is_none"
1330 )]
1331 pub credentials: Option<AppsManifestCreateResponseCredentials>,
1332 #[serde(
1333 default,
1334 deserialize_with = "crate::de::opt_string",
1335 skip_serializing_if = "Option::is_none"
1336 )]
1337 pub oauth_authorize_url: Option<String>,
1338 #[serde(
1339 default,
1340 deserialize_with = "crate::de::opt_object",
1341 skip_serializing_if = "Option::is_none"
1342 )]
1343 pub response_metadata: Option<ResponseMetadata>,
1344 #[serde(
1345 default,
1346 deserialize_with = "crate::de::opt_string",
1347 skip_serializing_if = "Option::is_none"
1348 )]
1349 pub warning: Option<String>,
1350}
1351
1352#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1353pub struct AppsManifestCreateResponseCredentials {
1354 #[serde(
1355 default,
1356 deserialize_with = "crate::de::opt_string",
1357 skip_serializing_if = "Option::is_none"
1358 )]
1359 pub client_id: Option<String>,
1360 #[serde(
1361 default,
1362 deserialize_with = "crate::de::opt_string",
1363 skip_serializing_if = "Option::is_none"
1364 )]
1365 pub client_secret: Option<String>,
1366 #[serde(
1367 default,
1368 deserialize_with = "crate::de::opt_string",
1369 skip_serializing_if = "Option::is_none"
1370 )]
1371 pub verification_token: Option<String>,
1372 #[serde(
1373 default,
1374 deserialize_with = "crate::de::opt_string",
1375 skip_serializing_if = "Option::is_none"
1376 )]
1377 pub signing_secret: Option<String>,
1378}
1379
1380#[doc(alias = "apps.manifest.delete")]
1384#[derive(Debug, Clone, PartialEq, Serialize)]
1385#[non_exhaustive]
1386pub struct AppsManifestDeleteRequest {
1387 pub app_id: String,
1389}
1390
1391impl AppsManifestDeleteRequest {
1392 pub fn new(app_id: impl Into<String>) -> Self {
1393 Self {
1394 app_id: app_id.into(),
1395 }
1396 }
1397}
1398
1399impl SlackApiMethod for AppsManifestDeleteRequest {
1400 const METHOD: &'static str = "apps.manifest.delete";
1401 type Response = AppsManifestDeleteResponse;
1402}
1403
1404#[doc(alias = "apps.manifest.delete")]
1406#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1407pub struct AppsManifestDeleteResponse {
1408 #[serde(flatten)]
1410 pub extra: serde_json::Map<String, serde_json::Value>,
1411 #[serde(
1412 default,
1413 deserialize_with = "crate::de::opt_object",
1414 skip_serializing_if = "Option::is_none"
1415 )]
1416 pub response_metadata: Option<ResponseMetadata>,
1417 #[serde(
1418 default,
1419 deserialize_with = "crate::de::opt_string",
1420 skip_serializing_if = "Option::is_none"
1421 )]
1422 pub warning: Option<String>,
1423}
1424
1425#[doc(alias = "apps.manifest.export")]
1429#[derive(Debug, Clone, PartialEq, Serialize)]
1430#[non_exhaustive]
1431pub struct AppsManifestExportRequest {
1432 pub app_id: String,
1434}
1435
1436impl AppsManifestExportRequest {
1437 pub fn new(app_id: impl Into<String>) -> Self {
1438 Self {
1439 app_id: app_id.into(),
1440 }
1441 }
1442}
1443
1444impl SlackApiMethod for AppsManifestExportRequest {
1445 const METHOD: &'static str = "apps.manifest.export";
1446 type Response = AppsManifestExportResponse;
1447}
1448
1449#[doc(alias = "apps.manifest.export")]
1451#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1452pub struct AppsManifestExportResponse {
1453 #[serde(
1454 default,
1455 deserialize_with = "crate::de::opt_object",
1456 skip_serializing_if = "Option::is_none"
1457 )]
1458 pub manifest: Option<AppsManifestExportResponseManifest>,
1459 #[serde(
1460 default,
1461 deserialize_with = "crate::de::opt_object",
1462 skip_serializing_if = "Option::is_none"
1463 )]
1464 pub response_metadata: Option<ResponseMetadata>,
1465 #[serde(
1466 default,
1467 deserialize_with = "crate::de::opt_string",
1468 skip_serializing_if = "Option::is_none"
1469 )]
1470 pub warning: Option<String>,
1471}
1472
1473#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1474pub struct AppsManifestExportResponseManifest {
1475 #[serde(
1476 rename = "_metadata",
1477 default,
1478 deserialize_with = "crate::de::opt_object",
1479 skip_serializing_if = "Option::is_none"
1480 )]
1481 pub metadata: Option<AppsManifestExportResponseManifestMetadata>,
1482 #[serde(
1483 default,
1484 deserialize_with = "crate::de::opt_object",
1485 skip_serializing_if = "Option::is_none"
1486 )]
1487 pub display_information: Option<AppsManifestExportResponseManifestDisplayInformation>,
1488 #[serde(
1489 default,
1490 deserialize_with = "crate::de::opt_object",
1491 skip_serializing_if = "Option::is_none"
1492 )]
1493 pub features: Option<AppsManifestExportResponseManifestFeatures>,
1494 #[serde(
1495 default,
1496 deserialize_with = "crate::de::opt_object",
1497 skip_serializing_if = "Option::is_none"
1498 )]
1499 pub oauth_config: Option<AppsManifestExportResponseManifestOauthConfig>,
1500 #[serde(
1501 default,
1502 deserialize_with = "crate::de::opt_object",
1503 skip_serializing_if = "Option::is_none"
1504 )]
1505 pub settings: Option<AppsManifestExportResponseManifestSettings>,
1506}
1507
1508#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1509pub struct AppsManifestExportResponseManifestMetadata {
1510 #[serde(
1511 default,
1512 deserialize_with = "crate::de::opt_i64",
1513 skip_serializing_if = "Option::is_none"
1514 )]
1515 pub major_version: Option<i64>,
1516 #[serde(
1517 default,
1518 deserialize_with = "crate::de::opt_i64",
1519 skip_serializing_if = "Option::is_none"
1520 )]
1521 pub minor_version: Option<i64>,
1522}
1523
1524#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1525pub struct AppsManifestExportResponseManifestDisplayInformation {
1526 #[serde(
1527 default,
1528 deserialize_with = "crate::de::opt_string",
1529 skip_serializing_if = "Option::is_none"
1530 )]
1531 pub name: Option<String>,
1532 #[serde(
1533 default,
1534 deserialize_with = "crate::de::opt_string",
1535 skip_serializing_if = "Option::is_none"
1536 )]
1537 pub description: Option<String>,
1538 #[serde(
1539 default,
1540 deserialize_with = "crate::de::opt_string",
1541 skip_serializing_if = "Option::is_none"
1542 )]
1543 pub background_color: Option<String>,
1544 #[serde(
1545 default,
1546 deserialize_with = "crate::de::opt_string",
1547 skip_serializing_if = "Option::is_none"
1548 )]
1549 pub long_description: Option<String>,
1550}
1551
1552#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1553pub struct AppsManifestExportResponseManifestFeatures {
1554 #[serde(
1555 default,
1556 deserialize_with = "crate::de::opt_object",
1557 skip_serializing_if = "Option::is_none"
1558 )]
1559 pub app_home: Option<AppsManifestExportResponseManifestFeaturesAppHome>,
1560 #[serde(
1561 default,
1562 deserialize_with = "crate::de::opt_object",
1563 skip_serializing_if = "Option::is_none"
1564 )]
1565 pub bot_user: Option<AppsManifestExportResponseManifestFeaturesBotUser>,
1566 #[serde(
1567 default,
1568 deserialize_with = "crate::de::vec",
1569 skip_serializing_if = "Vec::is_empty"
1570 )]
1571 pub slash_commands: Vec<AppsManifestExportResponseManifestFeaturesSlashCommands>,
1572 #[serde(
1573 default,
1574 deserialize_with = "crate::de::vec",
1575 skip_serializing_if = "Vec::is_empty"
1576 )]
1577 pub workflow_steps: Vec<AppsManifestExportResponseManifestFeaturesWorkflowSteps>,
1578}
1579
1580#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1581pub struct AppsManifestExportResponseManifestFeaturesAppHome {
1582 #[serde(
1583 default,
1584 deserialize_with = "crate::de::opt_bool",
1585 skip_serializing_if = "Option::is_none"
1586 )]
1587 pub home_tab_enabled: Option<bool>,
1588 #[serde(
1589 default,
1590 deserialize_with = "crate::de::opt_bool",
1591 skip_serializing_if = "Option::is_none"
1592 )]
1593 pub messages_tab_enabled: Option<bool>,
1594 #[serde(
1595 default,
1596 deserialize_with = "crate::de::opt_bool",
1597 skip_serializing_if = "Option::is_none"
1598 )]
1599 pub messages_tab_read_only_enabled: Option<bool>,
1600}
1601
1602#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1603pub struct AppsManifestExportResponseManifestFeaturesBotUser {
1604 #[serde(
1605 default,
1606 deserialize_with = "crate::de::opt_string",
1607 skip_serializing_if = "Option::is_none"
1608 )]
1609 pub display_name: Option<String>,
1610 #[serde(
1611 default,
1612 deserialize_with = "crate::de::opt_bool",
1613 skip_serializing_if = "Option::is_none"
1614 )]
1615 pub always_online: Option<bool>,
1616}
1617
1618#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1619pub struct AppsManifestExportResponseManifestFeaturesSlashCommands {
1620 #[serde(
1621 default,
1622 deserialize_with = "crate::de::opt_string",
1623 skip_serializing_if = "Option::is_none"
1624 )]
1625 pub command: Option<String>,
1626 #[serde(
1627 default,
1628 deserialize_with = "crate::de::opt_string",
1629 skip_serializing_if = "Option::is_none"
1630 )]
1631 pub description: Option<String>,
1632 #[serde(
1633 default,
1634 deserialize_with = "crate::de::opt_string",
1635 skip_serializing_if = "Option::is_none"
1636 )]
1637 pub usage_hint: Option<String>,
1638 #[serde(
1639 default,
1640 deserialize_with = "crate::de::opt_bool",
1641 skip_serializing_if = "Option::is_none"
1642 )]
1643 pub should_escape: Option<bool>,
1644}
1645
1646#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1647pub struct AppsManifestExportResponseManifestFeaturesWorkflowSteps {
1648 #[serde(
1649 default,
1650 deserialize_with = "crate::de::opt_string",
1651 skip_serializing_if = "Option::is_none"
1652 )]
1653 pub name: Option<String>,
1654 #[serde(
1655 default,
1656 deserialize_with = "crate::de::opt_string",
1657 skip_serializing_if = "Option::is_none"
1658 )]
1659 pub callback_id: Option<String>,
1660}
1661
1662#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1663pub struct AppsManifestExportResponseManifestOauthConfig {
1664 #[serde(
1665 default,
1666 deserialize_with = "crate::de::vec",
1667 skip_serializing_if = "Vec::is_empty"
1668 )]
1669 pub redirect_urls: Vec<String>,
1670 #[serde(
1671 default,
1672 deserialize_with = "crate::de::opt_object",
1673 skip_serializing_if = "Option::is_none"
1674 )]
1675 pub scopes: Option<AppsManifestExportResponseManifestOauthConfigScopes>,
1676}
1677
1678#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1679pub struct AppsManifestExportResponseManifestOauthConfigScopes {
1680 #[serde(
1681 default,
1682 deserialize_with = "crate::de::vec",
1683 skip_serializing_if = "Vec::is_empty"
1684 )]
1685 pub bot: Vec<String>,
1686}
1687
1688#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1689pub struct AppsManifestExportResponseManifestSettings {
1690 #[serde(
1691 default,
1692 deserialize_with = "crate::de::opt_object",
1693 skip_serializing_if = "Option::is_none"
1694 )]
1695 pub event_subscriptions: Option<AppsManifestExportResponseManifestSettingsEventSubscriptions>,
1696 #[serde(
1697 default,
1698 deserialize_with = "crate::de::opt_object",
1699 skip_serializing_if = "Option::is_none"
1700 )]
1701 pub interactivity: Option<AppsManifestExportResponseManifestSettingsInteractivity>,
1702 #[serde(
1703 default,
1704 deserialize_with = "crate::de::opt_bool",
1705 skip_serializing_if = "Option::is_none"
1706 )]
1707 pub org_deploy_enabled: Option<bool>,
1708 #[serde(
1709 default,
1710 deserialize_with = "crate::de::opt_bool",
1711 skip_serializing_if = "Option::is_none"
1712 )]
1713 pub socket_mode_enabled: Option<bool>,
1714 #[serde(
1715 default,
1716 deserialize_with = "crate::de::opt_bool",
1717 skip_serializing_if = "Option::is_none"
1718 )]
1719 pub is_hosted: Option<bool>,
1720 #[serde(
1721 default,
1722 deserialize_with = "crate::de::opt_bool",
1723 skip_serializing_if = "Option::is_none"
1724 )]
1725 pub token_rotation_enabled: Option<bool>,
1726}
1727
1728#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1729pub struct AppsManifestExportResponseManifestSettingsEventSubscriptions {
1730 #[serde(
1731 default,
1732 deserialize_with = "crate::de::vec",
1733 skip_serializing_if = "Vec::is_empty"
1734 )]
1735 pub bot_events: Vec<String>,
1736}
1737
1738#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1739pub struct AppsManifestExportResponseManifestSettingsInteractivity {
1740 #[serde(
1741 default,
1742 deserialize_with = "crate::de::opt_bool",
1743 skip_serializing_if = "Option::is_none"
1744 )]
1745 pub is_enabled: Option<bool>,
1746}
1747
1748#[doc(alias = "apps.manifest.update")]
1752#[derive(Debug, Clone, PartialEq, Serialize)]
1753#[non_exhaustive]
1754pub struct AppsManifestUpdateRequest {
1755 pub manifest: String,
1757 pub app_id: String,
1759}
1760
1761impl AppsManifestUpdateRequest {
1762 pub fn new(manifest: impl Into<String>, app_id: impl Into<String>) -> Self {
1763 Self {
1764 manifest: manifest.into(),
1765 app_id: app_id.into(),
1766 }
1767 }
1768}
1769
1770impl SlackApiMethod for AppsManifestUpdateRequest {
1771 const METHOD: &'static str = "apps.manifest.update";
1772 type Response = AppsManifestUpdateResponse;
1773}
1774
1775#[doc(alias = "apps.manifest.update")]
1777#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1778pub struct AppsManifestUpdateResponse {
1779 #[serde(
1780 default,
1781 deserialize_with = "crate::de::opt_string",
1782 skip_serializing_if = "Option::is_none"
1783 )]
1784 pub app_id: Option<String>,
1785 #[serde(
1786 default,
1787 deserialize_with = "crate::de::opt_bool",
1788 skip_serializing_if = "Option::is_none"
1789 )]
1790 pub permissions_updated: Option<bool>,
1791 #[serde(
1792 default,
1793 deserialize_with = "crate::de::opt_object",
1794 skip_serializing_if = "Option::is_none"
1795 )]
1796 pub response_metadata: Option<ResponseMetadata>,
1797 #[serde(
1798 default,
1799 deserialize_with = "crate::de::opt_string",
1800 skip_serializing_if = "Option::is_none"
1801 )]
1802 pub warning: Option<String>,
1803}
1804
1805#[doc(alias = "apps.manifest.validate")]
1809#[derive(Debug, Clone, PartialEq, Serialize)]
1810#[non_exhaustive]
1811pub struct AppsManifestValidateRequest {
1812 pub manifest: String,
1814 #[serde(skip_serializing_if = "Option::is_none")]
1816 pub app_id: Option<String>,
1817}
1818
1819impl AppsManifestValidateRequest {
1820 pub fn new(manifest: impl Into<String>) -> Self {
1821 Self {
1822 manifest: manifest.into(),
1823 app_id: None,
1824 }
1825 }
1826
1827 pub fn app_id(mut self, app_id: impl Into<String>) -> Self {
1828 self.app_id = Some(app_id.into());
1829 self
1830 }
1831}
1832
1833impl SlackApiMethod for AppsManifestValidateRequest {
1834 const METHOD: &'static str = "apps.manifest.validate";
1835 type Response = AppsManifestValidateResponse;
1836}
1837
1838#[doc(alias = "apps.manifest.validate")]
1840#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1841pub struct AppsManifestValidateResponse {
1842 #[serde(
1843 default,
1844 deserialize_with = "crate::de::vec",
1845 skip_serializing_if = "Vec::is_empty"
1846 )]
1847 pub errors: Vec<serde_json::Value>,
1848 #[serde(
1849 default,
1850 deserialize_with = "crate::de::opt_object",
1851 skip_serializing_if = "Option::is_none"
1852 )]
1853 pub response_metadata: Option<ResponseMetadata>,
1854 #[serde(
1855 default,
1856 deserialize_with = "crate::de::opt_string",
1857 skip_serializing_if = "Option::is_none"
1858 )]
1859 pub warning: Option<String>,
1860}
1861
1862#[doc(alias = "apps.uninstall")]
1866#[derive(Debug, Clone, PartialEq, Serialize)]
1867#[non_exhaustive]
1868pub struct AppsUninstallRequest {
1869 pub client_id: String,
1871 pub client_secret: String,
1873}
1874
1875impl AppsUninstallRequest {
1876 pub fn new(client_id: impl Into<String>, client_secret: impl Into<String>) -> Self {
1877 Self {
1878 client_id: client_id.into(),
1879 client_secret: client_secret.into(),
1880 }
1881 }
1882}
1883
1884impl SlackApiMethod for AppsUninstallRequest {
1885 const METHOD: &'static str = "apps.uninstall";
1886 type Response = AppsUninstallResponse;
1887}
1888
1889#[doc(alias = "apps.uninstall")]
1891#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1892pub struct AppsUninstallResponse {
1893 #[serde(flatten)]
1895 pub extra: serde_json::Map<String, serde_json::Value>,
1896 #[serde(
1897 default,
1898 deserialize_with = "crate::de::opt_object",
1899 skip_serializing_if = "Option::is_none"
1900 )]
1901 pub response_metadata: Option<ResponseMetadata>,
1902 #[serde(
1903 default,
1904 deserialize_with = "crate::de::opt_string",
1905 skip_serializing_if = "Option::is_none"
1906 )]
1907 pub warning: Option<String>,
1908}
1909
1910#[doc(alias = "apps.user.connection.update")]
1914#[derive(Debug, Clone, PartialEq, Serialize)]
1915#[non_exhaustive]
1916pub struct AppsUserConnectionUpdateRequest {
1917 pub user_id: String,
1919 pub status: String,
1921}
1922
1923impl AppsUserConnectionUpdateRequest {
1924 pub fn new(user_id: impl Into<String>, status: impl Into<String>) -> Self {
1925 Self {
1926 user_id: user_id.into(),
1927 status: status.into(),
1928 }
1929 }
1930}
1931
1932impl SlackApiMethod for AppsUserConnectionUpdateRequest {
1933 const METHOD: &'static str = "apps.user.connection.update";
1934 type Response = AppsUserConnectionUpdateResponse;
1935}
1936
1937#[doc(alias = "apps.user.connection.update")]
1939#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1940pub struct AppsUserConnectionUpdateResponse {
1941 #[serde(flatten)]
1943 pub extra: serde_json::Map<String, serde_json::Value>,
1944 #[serde(
1945 default,
1946 deserialize_with = "crate::de::opt_object",
1947 skip_serializing_if = "Option::is_none"
1948 )]
1949 pub response_metadata: Option<ResponseMetadata>,
1950 #[serde(
1951 default,
1952 deserialize_with = "crate::de::opt_string",
1953 skip_serializing_if = "Option::is_none"
1954 )]
1955 pub warning: Option<String>,
1956}
1957
1958impl SlackClient {
1959 #[doc(alias = "apps.activities.list")]
1971 pub async fn apps_activities_list(
1972 &self,
1973 request: &AppsActivitiesListRequest,
1974 ) -> Result<AppsActivitiesListResponse, SlackError> {
1975 self.call(request).await
1976 }
1977
1978 #[doc(alias = "apps.auth.external.delete")]
1986 pub async fn apps_auth_external_delete(
1987 &self,
1988 request: &AppsAuthExternalDeleteRequest,
1989 ) -> Result<AppsAuthExternalDeleteResponse, SlackError> {
1990 self.call(request).await
1991 }
1992
1993 #[doc(alias = "apps.auth.external.get")]
2001 pub async fn apps_auth_external_get(
2002 &self,
2003 request: &AppsAuthExternalGetRequest,
2004 ) -> Result<AppsAuthExternalGetResponse, SlackError> {
2005 self.call(request).await
2006 }
2007
2008 #[doc(alias = "apps.connections.open")]
2016 pub async fn apps_connections_open(
2017 &self,
2018 request: &AppsConnectionsOpenRequest,
2019 ) -> Result<AppsConnectionsOpenResponse, SlackError> {
2020 self.call(request).await
2021 }
2022
2023 #[doc(alias = "apps.datastore.bulkDelete")]
2035 pub async fn apps_datastore_bulk_delete(
2036 &self,
2037 request: &AppsDatastoreBulkDeleteRequest,
2038 ) -> Result<AppsDatastoreBulkDeleteResponse, SlackError> {
2039 self.call(request).await
2040 }
2041
2042 #[doc(alias = "apps.datastore.bulkGet")]
2054 pub async fn apps_datastore_bulk_get(
2055 &self,
2056 request: &AppsDatastoreBulkGetRequest,
2057 ) -> Result<AppsDatastoreBulkGetResponse, SlackError> {
2058 self.call(request).await
2059 }
2060
2061 #[doc(alias = "apps.datastore.bulkPut")]
2073 pub async fn apps_datastore_bulk_put(
2074 &self,
2075 request: &AppsDatastoreBulkPutRequest,
2076 ) -> Result<AppsDatastoreBulkPutResponse, SlackError> {
2077 self.call(request).await
2078 }
2079
2080 #[doc(alias = "apps.datastore.count")]
2092 pub async fn apps_datastore_count(
2093 &self,
2094 request: &AppsDatastoreCountRequest,
2095 ) -> Result<AppsDatastoreCountResponse, SlackError> {
2096 self.call(request).await
2097 }
2098
2099 #[doc(alias = "apps.datastore.delete")]
2111 pub async fn apps_datastore_delete(
2112 &self,
2113 request: &AppsDatastoreDeleteRequest,
2114 ) -> Result<AppsDatastoreDeleteResponse, SlackError> {
2115 self.call(request).await
2116 }
2117
2118 #[doc(alias = "apps.datastore.get")]
2130 pub async fn apps_datastore_get(
2131 &self,
2132 request: &AppsDatastoreGetRequest,
2133 ) -> Result<AppsDatastoreGetResponse, SlackError> {
2134 self.call(request).await
2135 }
2136
2137 #[doc(alias = "apps.datastore.put")]
2149 pub async fn apps_datastore_put(
2150 &self,
2151 request: &AppsDatastorePutRequest,
2152 ) -> Result<AppsDatastorePutResponse, SlackError> {
2153 self.call(request).await
2154 }
2155
2156 #[doc(alias = "apps.datastore.query")]
2168 pub async fn apps_datastore_query(
2169 &self,
2170 request: &AppsDatastoreQueryRequest,
2171 ) -> Result<AppsDatastoreQueryResponse, SlackError> {
2172 self.call(request).await
2173 }
2174
2175 #[doc(alias = "apps.datastore.update")]
2187 pub async fn apps_datastore_update(
2188 &self,
2189 request: &AppsDatastoreUpdateRequest,
2190 ) -> Result<AppsDatastoreUpdateResponse, SlackError> {
2191 self.call(request).await
2192 }
2193
2194 #[doc(alias = "apps.event.authorizations.list")]
2202 pub async fn apps_event_authorizations_list(
2203 &self,
2204 request: &AppsEventAuthorizationsListRequest,
2205 ) -> Result<AppsEventAuthorizationsListResponse, SlackError> {
2206 self.call(request).await
2207 }
2208
2209 #[doc(alias = "apps.icon.set")]
2221 pub async fn apps_icon_set(
2222 &self,
2223 request: &AppsIconSetRequest,
2224 ) -> Result<AppsIconSetResponse, SlackError> {
2225 self.call(request).await
2226 }
2227
2228 #[doc(alias = "apps.managed.permissions.set")]
2236 pub async fn apps_managed_permissions_set(
2237 &self,
2238 request: &AppsManagedPermissionsSetRequest,
2239 ) -> Result<AppsManagedPermissionsSetResponse, SlackError> {
2240 self.call(request).await
2241 }
2242
2243 #[doc(alias = "apps.manifest.create")]
2251 pub async fn apps_manifest_create(
2252 &self,
2253 request: &AppsManifestCreateRequest,
2254 ) -> Result<AppsManifestCreateResponse, SlackError> {
2255 self.call(request).await
2256 }
2257
2258 #[doc(alias = "apps.manifest.delete")]
2266 pub async fn apps_manifest_delete(
2267 &self,
2268 request: &AppsManifestDeleteRequest,
2269 ) -> Result<AppsManifestDeleteResponse, SlackError> {
2270 self.call(request).await
2271 }
2272
2273 #[doc(alias = "apps.manifest.export")]
2281 pub async fn apps_manifest_export(
2282 &self,
2283 request: &AppsManifestExportRequest,
2284 ) -> Result<AppsManifestExportResponse, SlackError> {
2285 self.call(request).await
2286 }
2287
2288 #[doc(alias = "apps.manifest.update")]
2296 pub async fn apps_manifest_update(
2297 &self,
2298 request: &AppsManifestUpdateRequest,
2299 ) -> Result<AppsManifestUpdateResponse, SlackError> {
2300 self.call(request).await
2301 }
2302
2303 #[doc(alias = "apps.manifest.validate")]
2311 pub async fn apps_manifest_validate(
2312 &self,
2313 request: &AppsManifestValidateRequest,
2314 ) -> Result<AppsManifestValidateResponse, SlackError> {
2315 self.call(request).await
2316 }
2317
2318 #[doc(alias = "apps.uninstall")]
2326 pub async fn apps_uninstall(
2327 &self,
2328 request: &AppsUninstallRequest,
2329 ) -> Result<AppsUninstallResponse, SlackError> {
2330 self.call(request).await
2331 }
2332
2333 #[doc(alias = "apps.user.connection.update")]
2345 pub async fn apps_user_connection_update(
2346 &self,
2347 request: &AppsUserConnectionUpdateRequest,
2348 ) -> Result<AppsUserConnectionUpdateResponse, SlackError> {
2349 self.call(request).await
2350 }
2351}