pub struct CipherAdminClient {
pub(crate) client: Client,
}Expand description
Client for performing admin operations on ciphers. Unlike the regular CiphersClient, this client uses the admin server API endpoints, and does not modify local state.
Fields§
§client: ClientImplementations§
Source§impl CipherAdminClient
impl CipherAdminClient
Sourcepub async fn create(
&self,
request: CipherCreateRequest,
) -> Result<CipherView, CreateCipherAdminError>
pub async fn create( &self, request: CipherCreateRequest, ) -> Result<CipherView, CreateCipherAdminError>
Creates a new Cipher for an organization, using the admin server endpoints. Creates the Cipher on the server only, does not store it to local state.
Source§impl CipherAdminClient
impl CipherAdminClient
Sourcepub async fn delete(&self, cipher_id: CipherId) -> Result<(), ApiError>
pub async fn delete(&self, cipher_id: CipherId) -> Result<(), ApiError>
Deletes the Cipher with the matching CipherId from the server, using the admin endpoint. Affects server data only, does not modify local state.
Sourcepub async fn soft_delete(&self, cipher_id: CipherId) -> Result<(), ApiError>
pub async fn soft_delete(&self, cipher_id: CipherId) -> Result<(), ApiError>
Soft-deletes the Cipher with the matching CipherId from the server, using the admin endpoint. Affects server data only, does not modify local state.
Source§impl CipherAdminClient
impl CipherAdminClient
Sourcepub async fn edit(
&self,
request: CipherEditRequest,
original_cipher_view: CipherView,
) -> Result<CipherView, EditCipherAdminError>
pub async fn edit( &self, request: CipherEditRequest, original_cipher_view: CipherView, ) -> Result<CipherView, EditCipherAdminError>
Edit an existing Cipher and save it to the server.
Sourcepub async fn update_collection(
&self,
cipher_id: CipherId,
collection_ids: Vec<CollectionId>,
) -> Result<CipherView, EditCipherAdminError>
pub async fn update_collection( &self, cipher_id: CipherId, collection_ids: Vec<CollectionId>, ) -> Result<CipherView, EditCipherAdminError>
Adds the cipher matched by CipherId to any number of collections on the server.
Source§impl CipherAdminClient
impl CipherAdminClient
pub async fn list_org_ciphers( &self, org_id: OrganizationId, include_member_items: bool, ) -> Result<DecryptCipherListResult, GetOrganizationCiphersAdminError>
Source§impl CipherAdminClient
impl CipherAdminClient
Sourcepub async fn restore_as_admin(
&self,
cipher_id: CipherId,
) -> Result<CipherView, RestoreCipherAdminError>
pub async fn restore_as_admin( &self, cipher_id: CipherId, ) -> Result<CipherView, RestoreCipherAdminError>
Restores a soft-deleted cipher on the server, using the admin endpoint.
Sourcepub async fn restore_many_as_admin(
&self,
cipher_ids: Vec<CipherId>,
org_id: OrganizationId,
) -> Result<DecryptCipherListResult, RestoreCipherAdminError>
pub async fn restore_many_as_admin( &self, cipher_ids: Vec<CipherId>, org_id: OrganizationId, ) -> Result<DecryptCipherListResult, RestoreCipherAdminError>
Restores multiple soft-deleted ciphers on the server.
Trait Implementations§
Source§impl From<CipherAdminClient> for JsValue
impl From<CipherAdminClient> for JsValue
Source§fn from(value: CipherAdminClient) -> Self
fn from(value: CipherAdminClient) -> Self
Source§impl FromWasmAbi for CipherAdminClient
impl FromWasmAbi for CipherAdminClient
Source§impl IntoWasmAbi for CipherAdminClient
impl IntoWasmAbi for CipherAdminClient
Source§impl RefFromWasmAbi for CipherAdminClient
impl RefFromWasmAbi for CipherAdminClient
Source§type Anchor = RcRef<CipherAdminClient>
type Anchor = RcRef<CipherAdminClient>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl TryFromJsValue for CipherAdminClient
impl TryFromJsValue for CipherAdminClient
Source§impl VectorFromWasmAbi for CipherAdminClient
impl VectorFromWasmAbi for CipherAdminClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[CipherAdminClient]>
Source§impl VectorIntoWasmAbi for CipherAdminClient
impl VectorIntoWasmAbi for CipherAdminClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[CipherAdminClient]>) -> Self::Abi
Source§impl WasmDescribe for CipherAdminClient
impl WasmDescribe for CipherAdminClient
impl SupportsConstructor for CipherAdminClient
impl SupportsInstanceProperty for CipherAdminClient
impl SupportsStaticProperty for CipherAdminClient
Auto Trait Implementations§
impl Freeze for CipherAdminClient
impl !RefUnwindSafe for CipherAdminClient
impl Send for CipherAdminClient
impl Sync for CipherAdminClient
impl Unpin for CipherAdminClient
impl !UnwindSafe for CipherAdminClient
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.