pub struct InviteLinkUserClient {
pub(crate) key_store: KeyStore<KeySlotIds>,
pub(crate) api_configurations: Arc<ApiConfigurations>,
}Expand description
Client for organization invite link invitee (user) operations: checking link status, validating email eligibility, and accepting or self-confirming an invite.
Fields§
§key_store: KeyStore<KeySlotIds>§api_configurations: Arc<ApiConfigurations>Implementations§
Source§impl InviteLinkUserClient
impl InviteLinkUserClient
Sourcepub async fn get_status(
&self,
organization_id: OrganizationId,
code: String,
) -> Result<OrganizationInviteLinkStatusView, InviteLinkError>
pub async fn get_status( &self, organization_id: OrganizationId, code: String, ) -> Result<OrganizationInviteLinkStatusView, InviteLinkError>
Retrieves the status of an invite link. Used to verify basic availability before attempting to accept.
Sourcepub async fn is_email_allowed(
&self,
organization_id: OrganizationId,
code: String,
email: String,
) -> Result<bool, InviteLinkError>
pub async fn is_email_allowed( &self, organization_id: OrganizationId, code: String, email: String, ) -> Result<bool, InviteLinkError>
Returns whether the given email address is in the allowed domains for an invite link.
Sourcepub async fn accept_and_optionally_confirm(
&self,
organization_id: OrganizationId,
code: String,
invite_secret: InviteSecret,
default_collection_name: String,
enroll_into_account_recovery: bool,
) -> Result<(), AcceptInviteLinkError>
pub async fn accept_and_optionally_confirm( &self, organization_id: OrganizationId, code: String, invite_secret: InviteSecret, default_collection_name: String, enroll_into_account_recovery: bool, ) -> Result<(), AcceptInviteLinkError>
Accepts an organization invite for the current user, optionally enrolling into account
recovery (when enroll_into_account_recovery is set) and — when the invite supports
confirmation — self-confirming.
§Errors
Server-reported failures are mapped onto typed variants: a 404 from any of the acceptance
endpoints becomes AcceptInviteLinkError::LinkNotFound, and a 400 validation
problem becomes the variant matching its error code (or
AcceptInviteLinkError::Unknown, carrying the server’s English description, for an
unrecognized code). Responses in the legacy error format carry no code and remain
AcceptInviteLinkError::Api.
Trait Implementations§
Source§impl From<InviteLinkUserClient> for JsValue
impl From<InviteLinkUserClient> for JsValue
Source§fn from(value: InviteLinkUserClient) -> Self
fn from(value: InviteLinkUserClient) -> Self
Source§impl FromClient for InviteLinkUserClient
impl FromClient for InviteLinkUserClient
Source§fn from_client(client: &Client) -> Self
fn from_client(client: &Client) -> Self
Client] reference.Source§impl FromWasm for InviteLinkUserClient
Available on crate feature wasm only.
impl FromWasm for InviteLinkUserClient
wasm only.Source§impl FromWasmAbi for InviteLinkUserClient
impl FromWasmAbi for InviteLinkUserClient
Source§impl IntoWasmAbi for InviteLinkUserClient
impl IntoWasmAbi for InviteLinkUserClient
Source§type Abi = WasmPtr<WasmRefCell<InviteLinkUserClient>>
type Abi = WasmPtr<WasmRefCell<InviteLinkUserClient>>
Source§impl LongRefFromWasmAbi for InviteLinkUserClient
impl LongRefFromWasmAbi for InviteLinkUserClient
Source§type Abi = WasmPtr<WasmRefCell<InviteLinkUserClient>>
type Abi = WasmPtr<WasmRefCell<InviteLinkUserClient>>
RefFromWasmAbi::AbiSource§type Anchor = RcRef<InviteLinkUserClient>
type Anchor = RcRef<InviteLinkUserClient>
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
RefFromWasmAbi::ref_from_abiSource§impl RefFromWasmAbi for InviteLinkUserClient
impl RefFromWasmAbi for InviteLinkUserClient
Source§type Abi = WasmPtr<WasmRefCell<InviteLinkUserClient>>
type Abi = WasmPtr<WasmRefCell<InviteLinkUserClient>>
Self are recovered from.Source§type Anchor = RcRef<InviteLinkUserClient>
type Anchor = RcRef<InviteLinkUserClient>
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 RefMutFromWasmAbi for InviteLinkUserClient
impl RefMutFromWasmAbi for InviteLinkUserClient
Source§type Abi = WasmPtr<WasmRefCell<InviteLinkUserClient>>
type Abi = WasmPtr<WasmRefCell<InviteLinkUserClient>>
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<InviteLinkUserClient>
type Anchor = RcRefMut<InviteLinkUserClient>
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for InviteLinkUserClient
impl SupportsInstanceProperty for InviteLinkUserClient
impl SupportsStaticProperty for InviteLinkUserClient
Source§impl ToWasm for InviteLinkUserClient
Available on crate feature wasm only.
impl ToWasm for InviteLinkUserClient
wasm only.Source§impl TryFromJsValue for InviteLinkUserClient
impl TryFromJsValue for InviteLinkUserClient
Source§fn try_from_js_value_ref(value: &JsValue) -> Option<Self>
fn try_from_js_value_ref(value: &JsValue) -> Option<Self>
Source§const NULLABLE: bool = false
const NULLABLE: bool = false
Self accepts null as a distinct value space, as
Nullable<T> does. An enclosing Option then passes null through
instead of reading it as None, so Option<T> is itself nullable
exactly when T is not. JsValue does not set this: it accepts
null as one value among all of them, not as a distinct space, and
Option<JsValue> reads it as None like the ABI does. This is the
JS-value side of NullableFromWasmAbi, which claims null at the
ABI.Source§impl VectorFromWasmAbi for InviteLinkUserClient
impl VectorFromWasmAbi for InviteLinkUserClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[InviteLinkUserClient]>
Source§impl VectorIntoWasmAbi for InviteLinkUserClient
impl VectorIntoWasmAbi for InviteLinkUserClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[InviteLinkUserClient]>) -> Self::Abi
Source§impl WasmDescribe for InviteLinkUserClient
impl WasmDescribe for InviteLinkUserClient
Auto Trait Implementations§
impl !RefUnwindSafe for InviteLinkUserClient
impl !UnwindSafe for InviteLinkUserClient
impl Freeze for InviteLinkUserClient
impl Send for InviteLinkUserClient
impl Sync for InviteLinkUserClient
impl Unpin for InviteLinkUserClient
impl UnsafeUnpin for InviteLinkUserClient
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> ⓘ
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 moreSource§impl<T> MaybeFromWasmAbi for Twhere
T: OptionFromWasmAbi,
impl<T> MaybeFromWasmAbi for Twhere
T: OptionFromWasmAbi,
Source§type MaybeAbi = <T as FromWasmAbi>::Abi
type MaybeAbi = <T as FromWasmAbi>::Abi
Option<Self>.Source§unsafe fn from_maybe_abi(js: <T as FromWasmAbi>::Abi) -> T
unsafe fn from_maybe_abi(js: <T as FromWasmAbi>::Abi) -> T
unsafe fn try_from_maybe_abi( js: <T as FromWasmAbi>::Abi, ) -> Result<T, &'static str>
Source§impl<T> MaybeIntoWasmAbi for Twhere
T: OptionIntoWasmAbi,
impl<T> MaybeIntoWasmAbi for Twhere
T: OptionIntoWasmAbi,
Source§type MaybeAbi = <T as IntoWasmAbi>::Abi
type MaybeAbi = <T as IntoWasmAbi>::Abi
Option<Self>.Source§fn into_maybe_abi(self) -> <T as IntoWasmAbi>::Abi
fn into_maybe_abi(self) -> <T as IntoWasmAbi>::Abi
Option<Self> ABI.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> 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.