1use serde::{Deserialize, Serialize};
6use serde_json::Value;
7
8#[derive(Debug, Serialize, Deserialize)]
10pub struct CommandResponse {
11 pub response: Value,
13
14 pub meta: CommandMeta,
16}
17
18#[derive(Debug, Serialize, Deserialize)]
20pub struct CommandMeta {
21 pub profile_name: Option<String>,
22 pub team_id: String,
23 pub user_id: String,
24 pub method: String,
25 pub command: String,
26}
27
28impl CommandResponse {
29 pub fn new(
31 response: Value,
32 profile_name: Option<String>,
33 team_id: String,
34 user_id: String,
35 method: String,
36 command: String,
37 ) -> Self {
38 Self {
39 response,
40 meta: CommandMeta {
41 profile_name,
42 team_id,
43 user_id,
44 method,
45 command,
46 },
47 }
48 }
49}