pub struct ConnectorClient<'a> { /* private fields */ }
Expand description
The connector client implements all relevant functions to communicate with an enmeshed connector.
Implementations§
Source§impl<'a> ConnectorClient<'a>
impl<'a> ConnectorClient<'a>
Source§impl<'a> ConnectorClient<'a>
All endpoints related to the enmeshed account.
impl<'a> ConnectorClient<'a>
All endpoints related to the enmeshed account.
Sourcepub async fn get_identity_info(&self) -> Result<IdentityInfo, Error>
pub async fn get_identity_info(&self) -> Result<IdentityInfo, Error>
Retrieves the IdentityInfo
of the connector the client is connected to.
Sourcepub async fn get_sync_info(&self) -> Result<SyncInfo, Error>
pub async fn get_sync_info(&self) -> Result<SyncInfo, Error>
Retrieves the date of the last sync ran if there has been one.
Sourcepub async fn sync(&self) -> Result<ConnectorSyncResult, Error>
pub async fn sync(&self) -> Result<ConnectorSyncResult, Error>
Syncs the connector with the backbone retrieving all messages and relationships that have been received since the last sync.
Source§impl<'a> ConnectorClient<'a>
All endpoints to manage the attributes of the connector.
impl<'a> ConnectorClient<'a>
All endpoints to manage the attributes of the connector.
pub async fn create_attribute( &self, attribute: &CreateAttributeRequest, ) -> Result<ConnectorAttribute, Error>
pub async fn get_attributes( &self, query: &GetAttributesRequest<'a>, ) -> Result<Vec<ConnectorAttribute>, Error>
pub async fn get_attribute_by_id( &self, id: &str, ) -> Result<ConnectorAttribute, Error>
pub async fn get_valid_attributes( &self, query: &GetValidAttributesRequest<'a>, ) -> Result<Vec<ConnectorAttribute>, Error>
pub async fn execute_identity_query( &self, body: &ExecuteIdentityAttributeQueryRequest<'a>, ) -> Result<Vec<ConnectorAttribute>, Error>
Source§impl<'a> ConnectorClient<'a>
All endpoints related to creating and verifying challenges.
impl<'a> ConnectorClient<'a>
All endpoints related to creating and verifying challenges.
pub async fn create_device_challenge(&self) -> Result<ConnectorChallenge, Error>
pub async fn create_identity_challenge( &self, ) -> Result<ConnectorChallenge, Error>
pub async fn create_relationship_challenge( &self, rel: &str, ) -> Result<ConnectorChallenge, Error>
pub async fn validate_challenge( &self, req: &ValidateChallengeRequest<'_>, ) -> Result<ConnectorChallengeValidationResult<Value, Value>, Error>
Source§impl<'a> ConnectorClient<'a>
All endpoints related to file management, like upload or download of files.
impl<'a> ConnectorClient<'a>
All endpoints related to file management, like upload or download of files.
pub async fn get_files( &self, files_query: &GetAllFilesRequest<'_>, ) -> Result<Vec<ConnectorFile>, Error>
pub async fn upload_file( &self, upload_body: &UploadFileRequest<'_>, ) -> Result<ConnectorFile, Error>
pub async fn get_own_files( &self, files_query: &GetOwnFilesRequest<'_>, ) -> Result<Vec<ConnectorFile>, Error>
pub async fn load_peer_file( &self, file_reference: &LoadPeerFileRequest, ) -> Result<Vec<ConnectorFile>, Error>
pub async fn get_peer_files( &self, peer_req: &GetPeerFilesRequest<'_>, ) -> Result<Vec<ConnectorFile>, Error>
pub async fn get_file(&self, file_id: &str) -> Result<Vec<ConnectorFile>, Error>
pub async fn get_file_data(&self, file_id: &str) -> Result<Vec<u8>, Error>
pub async fn get_file_qr_code(&self, file_id: &str) -> Result<Vec<u8>, Error>
pub async fn get_file_token( &self, file_id: &str, req: Option<CreateTokenForFileRequest<'_>>, ) -> Result<ConnectorToken<FileToken>, Error>
pub async fn get_file_token_qr_code( &self, file_id: &str, req: Option<CreateTokenQrCodeForFileRequest<'_>>, ) -> Result<Vec<u8>, Error>
Source§impl<'a> ConnectorClient<'a>
All endpoints related to managing incomming requests.
impl<'a> ConnectorClient<'a>
All endpoints related to managing incomming requests.
pub async fn get_incomming_request( &self, id: &str, ) -> Result<Vec<ConnectorRequest>, Error>
pub async fn get_incomming_requests( &self, req: &GetRequestsRequest<'_>, ) -> Result<Vec<ConnectorRequest>, Error>
pub async fn can_accept( &self, request_id: &str, req: &DecideRequest, ) -> Result<ConnectorRequestValidationResult, Error>
pub async fn can_reject( &self, request_id: &str, req: &DecideRequest, ) -> Result<ConnectorRequestValidationResult, Error>
pub async fn accept( &self, request_id: &str, req: &DecideRequest, ) -> Result<ConnectorRequest, Error>
pub async fn reject( &self, request_id: &str, req: &DecideRequest, ) -> Result<ConnectorRequest, Error>
Source§impl<'a> ConnectorClient<'a>
All endpoints related to managing messages.
impl<'a> ConnectorClient<'a>
All endpoints related to managing messages.
pub async fn get_messages( &self, attribute_query: &GetMessagesRequest, ) -> Result<Vec<ConnectorMessage<Value>>, Error>
pub async fn send_message<'i, T: Serialize + DeserializeOwned>( &self, send_message: &SendMessageRequest<'i, T>, ) -> Result<ConnectorMessage<T>, Error>
pub async fn get_message<T: DeserializeOwned>( &self, id: &str, ) -> Result<ConnectorMessageWithAttachments<T>, Error>
pub async fn get_attachment( &self, message_id: &str, attachment_id: &str, ) -> Result<ConnectorFile, Error>
pub async fn get_attachment_data( &self, message_id: &str, attachment_id: &str, ) -> Result<Vec<u8>, Error>
Source§impl ConnectorClient<'_>
All endpoints related to monotoring the connector status.
impl ConnectorClient<'_>
All endpoints related to monotoring the connector status.
pub async fn check_health(&self) -> Result<ConnectorHealth, Error>
pub async fn check_version(&self) -> Result<ConnectorVersionInfo, Error>
pub async fn check_request_stats(&self) -> Result<ConnectorRequestCount, Error>
pub async fn get_support(&self) -> Result<ConnectorSupport, Error>
Source§impl<'a> ConnectorClient<'a>
All endpoints related to creating and managing outgoing requests.
impl<'a> ConnectorClient<'a>
All endpoints related to creating and managing outgoing requests.