Struct Client

Source
pub struct Client { /* private fields */ }

Implementations§

Source§

impl Client

Source

pub fn new(config: Config) -> Result<Client>

Create a new API client.

Source

pub fn base_url(&self) -> &Url

Get the base url for the client

Source

pub fn get_sources(&self) -> Result<Vec<Source>>

List all visible sources.

Source

pub fn get_user(&self, user: impl Into<UserIdentifier>) -> Result<User>

Get a source by either id or name.

Source

pub fn get_source(&self, source: impl Into<SourceIdentifier>) -> Result<Source>

Get a source by either id or name.

Source

pub fn create_label_defs_bulk( &self, dataset_name: &DatasetFullName, label_group: LabelGroupName, label_defs: Vec<NewLabelDef>, ) -> Result<()>

Source

pub fn create_source( &self, source_name: &SourceFullName, options: NewSource<'_>, ) -> Result<Source>

Create a new source.

Source

pub fn update_source( &self, source_name: &SourceFullName, options: UpdateSource<'_>, ) -> Result<Source>

Update a source.

Source

pub fn delete_source(&self, source: impl Into<SourceIdentifier>) -> Result<()>

Delete a source.

Source

pub fn create_quota( &self, target_tenant_id: &TenantId, tenant_quota_kind: TenantQuotaKind, options: CreateQuota, ) -> Result<()>

Set a quota

Source

pub fn get_quotas( &self, tenant_id: &Option<UiPathTenantId>, ) -> Result<Vec<Quota>>

Get quotas for current tenant

Source

pub fn delete_user(&self, user: impl Into<UserIdentifier>) -> Result<()>

Delete a user.

Source

pub fn delete_comments( &self, source: impl Into<SourceIdentifier>, comments: &[CommentId], ) -> Result<()>

Delete comments by id in a source.

Source

pub fn get_comments_iter_page( &self, source_name: &SourceFullName, continuation: Option<&ContinuationKind>, to_timestamp: Option<DateTime<Utc>>, limit: usize, ) -> Result<CommentsIterPage>

Get a page of comments from a source.

Source

pub fn get_dataset_query_iter<'a>( &'a self, dataset_name: &'a DatasetFullName, params: &'a mut QueryRequestParams, ) -> DatasetQueryIter<'a>

Iterate through all comments for a given dataset query.

Source

pub fn get_comments_iter<'a>( &'a self, source_name: &'a SourceFullName, page_size: Option<usize>, timerange: CommentsIterTimerange, ) -> CommentsIter<'a>

Iterate through all comments in a source.

Source

pub fn get_keyed_sync_state_ids( &self, bucket_id: &BucketId, request: &GetKeyedSyncStateIdsRequest, ) -> Result<Vec<KeyedSyncStateId>>

Source

pub fn delete_keyed_sync_state( &self, bucket_id: &BucketId, id: &KeyedSyncStateId, ) -> Result<()>

Source

pub fn get_keyed_sync_states( &self, bucket_id: &BucketId, ) -> Result<Vec<KeyedSyncState>>

Source

pub fn get_email( &self, bucket_name: &BucketFullName, id: EmailId, ) -> Result<Vec<Email>>

Get a single of email from a bucket.

Source

pub fn get_emails_iter_page( &self, bucket_name: &BucketFullName, continuation: Option<&EmailContinuation>, limit: usize, ) -> Result<EmailsIterPage>

Get a page of emails from a bucket.

Source

pub fn get_emails_iter<'a>( &'a self, bucket_name: &'a BucketFullName, page_size: Option<usize>, ) -> EmailsIter<'a>

Iterate through all comments in a source.

Source

pub fn get_comment<'a>( &'a self, source_name: &'a SourceFullName, comment_id: &'a CommentId, ) -> Result<Comment>

Get a single comment by id.

Source

pub fn post_integration( &self, name: &IntegrationFullName, integration: &NewIntegration, ) -> Result<PostIntegrationResponse>

Source

pub fn put_integration( &self, name: &IntegrationFullName, integration: &NewIntegration, ) -> Result<PutIntegrationResponse>

Source

pub fn put_comments_split_on_failure( &self, source_name: &SourceFullName, comments: Vec<NewComment>, no_charge: bool, ) -> Result<SplitableRequestResponse<PutCommentsResponse>>

Source

pub fn put_comments( &self, source_name: &SourceFullName, comments: Vec<NewComment>, no_charge: bool, ) -> Result<PutCommentsResponse>

Source

pub fn put_stream( &self, dataset_name: &DatasetFullName, stream: &NewStream, ) -> Result<PutStreamResponse>

Source

pub fn get_audit_events( &self, minimum_timestamp: Option<DateTime<Utc>>, maximum_timestamp: Option<DateTime<Utc>>, continuation: Option<Continuation>, ) -> Result<AuditQueryResponse>

Source

pub fn get_latest_validation( &self, dataset_name: &DatasetFullName, ) -> Result<ValidationResponse>

Source

pub fn get_validation( &self, dataset_name: &DatasetFullName, model_version: &ModelVersion, ) -> Result<ValidationResponse>

Source

pub fn get_labellers( &self, dataset_name: &DatasetFullName, ) -> Result<Vec<UserModelMetadata>>

Source

pub fn get_label_validation( &self, label: &LabelName, dataset_name: &DatasetFullName, model_version: &ModelVersion, ) -> Result<LabelValidation>

Source

pub fn sync_comments( &self, source_name: &SourceFullName, comments: Vec<NewComment>, no_charge: bool, ) -> Result<SyncCommentsResponse>

Source

pub fn sync_comments_split_on_failure( &self, source_name: &SourceFullName, comments: Vec<NewComment>, no_charge: bool, ) -> Result<SplitableRequestResponse<SyncCommentsResponse>>

Source

pub fn sync_raw_emails( &self, source_name: &SourceFullName, documents: &[Document], transform_tag: &TransformTag, include_comments: bool, no_charge: bool, ) -> Result<SyncRawEmailsResponse>

Source

pub fn put_emails_split_on_failure( &self, bucket_name: &BucketFullName, emails: Vec<NewEmail>, no_charge: bool, ) -> Result<SplitableRequestResponse<PutEmailsResponse>>

Source

pub fn put_emails( &self, bucket_name: &BucketFullName, emails: Vec<NewEmail>, no_charge: bool, ) -> Result<PutEmailsResponse>

Source

pub fn post_user( &self, user_id: &UserId, user: UpdateUser, ) -> Result<PostUserResponse>

Source

pub fn put_comment_audio( &self, source_id: &SourceId, comment_id: &CommentId, audio_path: impl AsRef<Path>, ) -> Result<()>

Source

pub fn upload_ixp_document( &self, source_id: &SourceId, filename: String, bytes: Vec<u8>, ) -> Result<CommentId>

Source

pub fn upload_comment_attachment( &self, source_id: &SourceId, comment_id: &CommentId, attachment_index: usize, attachment: &PathBuf, ) -> Result<UploadAttachmentResponse>

Source

pub fn get_ixp_document( &self, source_id: &SourceId, comment_id: &CommentId, ) -> Result<Vec<u8>>

Source

pub fn get_attachment(&self, reference: &AttachmentReference) -> Result<Vec<u8>>

Source

pub fn get_integrations(&self) -> Result<Vec<Integration>>

Source

pub fn get_integration(&self, name: &IntegrationFullName) -> Result<Integration>

Source

pub fn get_datasets(&self) -> Result<Vec<Dataset>>

Source

pub fn get_dataset<IdentifierT>(&self, dataset: IdentifierT) -> Result<Dataset>
where IdentifierT: Into<DatasetIdentifier>,

Source

pub fn create_ixp_dataset(&self, dataset: IxpDatasetNew) -> Result<Dataset>

Create a ixp dataset.

Source

pub fn create_dataset( &self, dataset_name: &DatasetFullName, options: NewDataset<'_>, ) -> Result<Dataset>

Create a dataset.

Source

pub fn update_dataset( &self, dataset_name: &DatasetFullName, options: UpdateDataset<'_>, ) -> Result<Dataset>

Update a dataset.

Source

pub fn delete_dataset<IdentifierT>(&self, dataset: IdentifierT) -> Result<()>
where IdentifierT: Into<DatasetIdentifier>,

Source

pub fn get_labellings<'a>( &self, dataset_name: &DatasetFullName, comment_uids: impl Iterator<Item = &'a CommentUid>, ) -> Result<Vec<AnnotatedComment>>

Get labellings for a given a dataset and a list of comment UIDs.

Source

pub fn get_labellings_iter<'a>( &'a self, dataset_name: &'a DatasetFullName, source_id: &'a SourceId, return_predictions: bool, limit: Option<usize>, ) -> LabellingsIter<'a>

Iterate through all reviewed comments in a source.

Source

pub fn get_labellings_in_bulk( &self, dataset_name: &DatasetFullName, query_parameters: GetLabellingsInBulk<'_>, ) -> Result<GetAnnotationsResponse>

Get reviewed comments in bulk

Source

pub fn update_labelling( &self, dataset_name: &DatasetFullName, comment_uid: &CommentUid, labelling: Option<&[NewLabelling]>, entities: Option<&NewEntities>, moon_forms: Option<&[NewMoonForm]>, ) -> Result<AnnotatedComment>

Update labellings for a given a dataset and comment UID.

Source

pub fn get_comment_predictions<'a>( &self, dataset_name: &DatasetFullName, model_version: &ModelVersion, comment_uids: impl Iterator<Item = &'a CommentUid>, threshold: Option<CommentPredictionsThreshold>, labels: Option<Vec<TriggerLabelThreshold>>, ) -> Result<Vec<Prediction>>

Get predictions for a given a dataset, a model version, and a list of comment UIDs.

Source

pub fn get_streams(&self, dataset_name: &DatasetFullName) -> Result<Vec<Stream>>

Source

pub fn get_recent_comments( &self, dataset_name: &DatasetFullName, filter: &CommentFilter, limit: usize, continuation: Option<&Continuation>, ) -> Result<RecentCommentsPage>

Source

pub fn refresh_user_permissions(&self) -> Result<RefreshUserPermissionsResponse>

Source

pub fn get_current_user(&self) -> Result<User>

Source

pub fn get_users(&self) -> Result<Vec<User>>

Source

pub fn create_user(&self, user: NewUser<'_>) -> Result<User>

Source

pub fn dataset_summary( &self, dataset_name: &DatasetFullName, params: &SummaryRequestParams, ) -> Result<SummaryResponse>

Source

pub fn query_dataset_csv( &self, dataset_name: &DatasetFullName, params: &QueryRequestParams, ) -> Result<String>

Source

pub fn query_dataset( &self, dataset_name: &DatasetFullName, params: &QueryRequestParams, ) -> Result<QueryResponse>

Source

pub fn send_welcome_email(&self, user_id: UserId) -> Result<()>

Source

pub fn get_bucket_statistics( &self, bucket_name: &BucketFullName, ) -> Result<BucketStatistics>

Source

pub fn get_dataset_statistics( &self, dataset_name: &DatasetFullName, params: &DatasetStatisticsRequestParams, ) -> Result<CommentStatistics>

Source

pub fn get_source_statistics( &self, source_name: &SourceFullName, params: &SourceStatisticsRequestParams, ) -> Result<CommentStatistics>

Source

pub fn create_bucket( &self, bucket_name: &BucketFullName, options: NewBucket<'_>, ) -> Result<Bucket>

Create a new bucket.

Source

pub fn get_buckets(&self) -> Result<Vec<Bucket>>

Source

pub fn get_bucket<IdentifierT>(&self, bucket: IdentifierT) -> Result<Bucket>
where IdentifierT: Into<BucketIdentifier>,

Source

pub fn delete_bucket<IdentifierT>(&self, bucket: IdentifierT) -> Result<()>
where IdentifierT: Into<BucketIdentifier>,

Source

pub fn fetch_stream_comments( &self, stream_name: &StreamFullName, size: u32, ) -> Result<StreamBatch>

Source

pub fn get_stream(&self, stream_name: &StreamFullName) -> Result<Stream>

Source

pub fn advance_stream( &self, stream_name: &StreamFullName, sequence_id: StreamSequenceId, ) -> Result<()>

Source

pub fn reset_stream( &self, stream_name: &StreamFullName, to_comment_created_at: DateTime<Utc>, ) -> Result<()>

Source

pub fn tag_stream_exceptions( &self, stream_name: &StreamFullName, exceptions: &[StreamException<'_>], ) -> Result<()>

Source

pub fn get_project(&self, project_name: &ProjectName) -> Result<Project>

Gets a project.

Source

pub fn get_projects(&self) -> Result<Vec<Project>>

Gets all projects.

Source

pub fn create_project( &self, project_name: &ProjectName, options: NewProject<'_>, user_ids: &[UserId], ) -> Result<Project>

Creates a new project.

Source

pub fn update_project( &self, project_name: &ProjectName, options: UpdateProject<'_>, ) -> Result<Project>

Updates an existing project.

Source

pub fn delete_project( &self, project_name: &ProjectName, force_delete: ForceDeleteProject, ) -> Result<()>

Deletes an existing project.

Trait Implementations§

Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,