1use steam_enums::EResult;
4use steamid::SteamID;
5
6#[derive(Clone, Default)]
8pub struct LogOnDetails {
9 pub anonymous: bool,
11
12 pub refresh_token: Option<String>,
14
15 pub account_name: Option<String>,
17
18 pub password: Option<String>,
20
21 pub auth_code: Option<String>,
23
24 pub two_factor_code: Option<String>,
26
27 pub machine_auth_token: Option<String>,
29
30 pub logon_id: Option<u32>,
32
33 pub machine_name: Option<String>,
35
36 pub machine_id: Option<Vec<u8>>,
38
39 pub web_logon_token: Option<String>,
42
43 pub steam_id: Option<SteamID>,
46
47 pub client_os_type: Option<u32>,
49}
50
51impl std::fmt::Debug for LogOnDetails {
52 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
53 f.debug_struct("LogOnDetails")
54 .field("anonymous", &self.anonymous)
55 .field("account_name", &self.account_name)
56 .field("steam_id", &self.steam_id)
57 .field("logon_id", &self.logon_id)
58 .field("machine_name", &self.machine_name)
59 .field("client_os_type", &self.client_os_type)
60 .field("machine_id", &self.machine_id.as_ref().map(|v| format!("<{} bytes>", v.len())))
61 .field("refresh_token", &self.refresh_token.as_ref().map(|_| "<redacted>"))
63 .field("password", &self.password.as_ref().map(|_| "<redacted>"))
64 .field("auth_code", &self.auth_code.as_ref().map(|_| "<redacted>"))
65 .field("two_factor_code", &self.two_factor_code.as_ref().map(|_| "<redacted>"))
66 .field("machine_auth_token", &self.machine_auth_token.as_ref().map(|_| "<redacted>"))
67 .field("web_logon_token", &self.web_logon_token.as_ref().map(|_| "<redacted>"))
68 .finish()
69 }
70}
71
72#[derive(Debug, Clone)]
74pub struct LogOnResponse {
75 pub eresult: EResult,
77
78 pub steam_id: SteamID,
80
81 pub public_ip: Option<String>,
83
84 pub cell_id: u32,
86
87 pub vanity_url: Option<String>,
89
90 pub email_domain: Option<String>,
92
93 pub steam_guard_required: bool,
95
96 pub heartbeat_seconds: Option<i32>,
98
99 pub server_time: Option<u32>,
101
102 pub account_flags: Option<u32>,
104
105 pub user_country: Option<String>,
107
108 pub ip_country_code: Option<String>,
110
111 pub client_instance_id: Option<u64>,
113
114 pub token_id: Option<u64>,
116
117 pub family_group_id: Option<u64>,
119
120 pub eresult_extended: Option<i32>,
122
123 pub cell_id_ping_threshold: Option<u32>,
125
126 pub force_client_update_check: Option<bool>,
128
129 pub agreement_session_url: Option<String>,
131
132 pub legacy_out_of_game_heartbeat_seconds: Option<i32>,
134
135 pub parental_settings: Option<Vec<u8>>,
137
138 pub parental_setting_signature: Option<Vec<u8>>,
140
141 pub count_loginfailures_to_migrate: Option<i32>,
143
144 pub count_disconnects_to_migrate: Option<i32>,
146
147 pub ogs_data_report_time_window: Option<i32>,
149
150 pub steam2_ticket: Option<Vec<u8>>,
152}
153
154#[derive(Debug, Clone)]
156pub struct AccountInfo {
157 pub name: String,
159
160 pub country: String,
162
163 pub authed_machines: u32,
165
166 pub flags: u32,
168
169 pub facebook_id: Option<String>,
171
172 pub facebook_name: Option<String>,
174}
175
176#[derive(Debug, Clone)]
178pub struct EmailInfo {
179 pub address: String,
181
182 pub validated: bool,
184}
185
186#[derive(Debug, Clone)]
188pub struct Limitations {
189 pub limited: bool,
191
192 pub community_banned: bool,
194
195 pub locked: bool,
197
198 pub can_invite_friends: bool,
200}
201
202#[derive(Debug, Clone)]
204pub struct VacStatus {
205 pub num_bans: u32,
207
208 pub appids: Vec<u32>,
210
211 pub ranges: Vec<(u32, u32)>,
213}
214
215#[derive(Debug, Clone)]
217pub struct WalletInfo {
218 pub has_wallet: bool,
220
221 pub currency: u32,
223
224 pub balance: i64,
226}
227
228#[derive(Debug, Clone)]
230pub struct QuickInviteLink {
231 pub invite_link: String,
233
234 pub invite_token: String,
236
237 pub invite_limit: Option<u64>,
239
240 pub invite_duration: Option<u64>,
242
243 pub time_created: Option<u32>,
245
246 pub valid: bool,
248}
249
250#[derive(Debug, Clone)]
252pub struct QuickInviteLinkValidity {
253 pub valid: bool,
255
256 pub steam_id: Option<SteamID>,
258
259 pub invite_duration: Option<u64>,
261}
262
263#[derive(Debug, Clone)]
265pub struct PersonaNameHistory {
266 pub name: String,
268 pub name_since: u32,
270}