Skip to main content

maple_sdk/
client_app.rs

1use serde::{Deserialize, Serialize};
2
3/// The application that configured an SDK client.
4///
5/// This optional, client-reported context is sent inside encrypted requests.
6/// It does not select credentials, grant access, or change billing policy.
7#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
8#[serde(rename_all = "lowercase")]
9pub enum ClientApp {
10    /// Maple Chat, including requests through its embedded proxy.
11    Chat,
12    /// The standalone Maple proxy.
13    Proxy,
14    /// Maple Work, including requests through its embedded proxy.
15    Work,
16}
17
18impl ClientApp {
19    /// The canonical value carried in encrypted request metadata.
20    pub const fn as_str(self) -> &'static str {
21        match self {
22            Self::Chat => "chat",
23            Self::Proxy => "proxy",
24            Self::Work => "work",
25        }
26    }
27}