bitwarden_wasm_internal/vault/
mod.rs1pub mod attachments;
2pub mod ciphers;
3pub mod folders;
4pub mod totp;
5
6use attachments::AttachmentsClient;
7use ciphers::CiphersClient;
8use totp::TotpClient;
9use wasm_bindgen::prelude::*;
10
11use crate::FoldersClient;
12
13#[wasm_bindgen]
14pub struct VaultClient(bitwarden_vault::VaultClient);
15
16impl VaultClient {
17 pub fn new(client: bitwarden_vault::VaultClient) -> Self {
18 Self(client)
19 }
20}
21
22#[wasm_bindgen]
23impl VaultClient {
24 pub fn attachments(&self) -> AttachmentsClient {
25 AttachmentsClient::new(self.0.attachments())
26 }
27
28 pub fn ciphers(&self) -> CiphersClient {
29 CiphersClient::new(self.0.ciphers())
30 }
31
32 pub fn folders(&self) -> FoldersClient {
33 FoldersClient::new(self.0.folders())
34 }
35
36 pub fn totp(&self) -> TotpClient {
37 TotpClient::new(self.0.clone())
38 }
39}