1pub use bitwarden_core::ClientSettings;
4use bitwarden_core::{OrganizationId, auth::auth_client::AuthClient};
5use bitwarden_generators::GeneratorClientsExt;
6
7use crate::{ProjectsClient, SecretsClient};
8
9pub struct SecretsManagerClient {
11 client: bitwarden_core::Client,
12}
13
14impl SecretsManagerClient {
15 pub fn new(settings: Option<ClientSettings>) -> Self {
17 Self {
18 client: bitwarden_core::Client::new(settings),
19 }
20 }
21
22 pub fn projects(&self) -> ProjectsClient {
24 ProjectsClient::new(self.client.clone())
25 }
26
27 pub fn secrets(&self) -> SecretsClient {
29 SecretsClient::new(self.client.clone())
30 }
31
32 pub fn auth(&self) -> AuthClient {
34 self.client.auth()
35 }
36
37 pub fn generator(&self) -> bitwarden_generators::GeneratorClient {
39 self.client.generator()
40 }
41
42 #[doc(hidden)]
43 pub fn get_access_token_organization(&self) -> Option<OrganizationId> {
44 self.client.internal.get_access_token_organization()
45 }
46}