pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
Sourcepub fn get_sources(&self) -> Result<Vec<Source>>
pub fn get_sources(&self) -> Result<Vec<Source>>
List all visible sources.
Sourcepub fn get_user(&self, user: impl Into<UserIdentifier>) -> Result<User>
pub fn get_user(&self, user: impl Into<UserIdentifier>) -> Result<User>
Get a source by either id or name.
Sourcepub fn get_source(&self, source: impl Into<SourceIdentifier>) -> Result<Source>
pub fn get_source(&self, source: impl Into<SourceIdentifier>) -> Result<Source>
Get a source by either id or name.
pub fn create_label_defs_bulk( &self, dataset_name: &DatasetFullName, label_group: LabelGroupName, label_defs: Vec<NewLabelDef>, ) -> Result<()>
Sourcepub fn create_source(
&self,
source_name: &SourceFullName,
options: NewSource<'_>,
) -> Result<Source>
pub fn create_source( &self, source_name: &SourceFullName, options: NewSource<'_>, ) -> Result<Source>
Create a new source.
Sourcepub fn update_source(
&self,
source_name: &SourceFullName,
options: UpdateSource<'_>,
) -> Result<Source>
pub fn update_source( &self, source_name: &SourceFullName, options: UpdateSource<'_>, ) -> Result<Source>
Update a source.
Sourcepub fn delete_source(&self, source: impl Into<SourceIdentifier>) -> Result<()>
pub fn delete_source(&self, source: impl Into<SourceIdentifier>) -> Result<()>
Delete a source.
Sourcepub fn create_quota(
&self,
target_tenant_id: &TenantId,
tenant_quota_kind: TenantQuotaKind,
options: CreateQuota,
) -> Result<()>
pub fn create_quota( &self, target_tenant_id: &TenantId, tenant_quota_kind: TenantQuotaKind, options: CreateQuota, ) -> Result<()>
Set a quota
Sourcepub fn get_quotas(
&self,
tenant_id: &Option<UiPathTenantId>,
) -> Result<Vec<Quota>>
pub fn get_quotas( &self, tenant_id: &Option<UiPathTenantId>, ) -> Result<Vec<Quota>>
Get quotas for current tenant
Sourcepub fn delete_user(&self, user: impl Into<UserIdentifier>) -> Result<()>
pub fn delete_user(&self, user: impl Into<UserIdentifier>) -> Result<()>
Delete a user.
Sourcepub fn delete_comments(
&self,
source: impl Into<SourceIdentifier>,
comments: &[CommentId],
) -> Result<()>
pub fn delete_comments( &self, source: impl Into<SourceIdentifier>, comments: &[CommentId], ) -> Result<()>
Delete comments by id in a source.
Sourcepub fn get_comments_iter_page(
&self,
source_name: &SourceFullName,
continuation: Option<&ContinuationKind>,
to_timestamp: Option<DateTime<Utc>>,
limit: usize,
) -> Result<CommentsIterPage>
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.
Sourcepub fn get_dataset_query_iter<'a>(
&'a self,
dataset_name: &'a DatasetFullName,
params: &'a mut QueryRequestParams,
) -> DatasetQueryIter<'a> ⓘ
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.
Sourcepub fn get_comments_iter<'a>(
&'a self,
source_name: &'a SourceFullName,
page_size: Option<usize>,
timerange: CommentsIterTimerange,
) -> CommentsIter<'a> ⓘ
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.
pub fn get_keyed_sync_state_ids( &self, bucket_id: &BucketId, request: &GetKeyedSyncStateIdsRequest, ) -> Result<Vec<KeyedSyncStateId>>
pub fn delete_keyed_sync_state( &self, bucket_id: &BucketId, id: &KeyedSyncStateId, ) -> Result<()>
pub fn get_keyed_sync_states( &self, bucket_id: &BucketId, ) -> Result<Vec<KeyedSyncState>>
Sourcepub fn get_email(
&self,
bucket_name: &BucketFullName,
id: EmailId,
) -> Result<Vec<Email>>
pub fn get_email( &self, bucket_name: &BucketFullName, id: EmailId, ) -> Result<Vec<Email>>
Get a single of email from a bucket.
Sourcepub fn get_emails_iter_page(
&self,
bucket_name: &BucketFullName,
continuation: Option<&EmailContinuation>,
limit: usize,
) -> Result<EmailsIterPage>
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.
Sourcepub fn get_emails_iter<'a>(
&'a self,
bucket_name: &'a BucketFullName,
page_size: Option<usize>,
) -> EmailsIter<'a> ⓘ
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.
Sourcepub fn get_comment<'a>(
&'a self,
source_name: &'a SourceFullName,
comment_id: &'a CommentId,
) -> Result<Comment>
pub fn get_comment<'a>( &'a self, source_name: &'a SourceFullName, comment_id: &'a CommentId, ) -> Result<Comment>
Get a single comment by id.
pub fn post_integration( &self, name: &IntegrationFullName, integration: &NewIntegration, ) -> Result<PostIntegrationResponse>
pub fn put_integration( &self, name: &IntegrationFullName, integration: &NewIntegration, ) -> Result<PutIntegrationResponse>
pub fn put_comments_split_on_failure( &self, source_name: &SourceFullName, comments: Vec<NewComment>, no_charge: bool, ) -> Result<SplitableRequestResponse<PutCommentsResponse>>
pub fn put_comments( &self, source_name: &SourceFullName, comments: Vec<NewComment>, no_charge: bool, ) -> Result<PutCommentsResponse>
pub fn put_stream( &self, dataset_name: &DatasetFullName, stream: &NewStream, ) -> Result<PutStreamResponse>
pub fn get_audit_events( &self, minimum_timestamp: Option<DateTime<Utc>>, maximum_timestamp: Option<DateTime<Utc>>, continuation: Option<Continuation>, ) -> Result<AuditQueryResponse>
pub fn get_latest_validation( &self, dataset_name: &DatasetFullName, ) -> Result<ValidationResponse>
pub fn get_validation( &self, dataset_name: &DatasetFullName, model_version: &ModelVersion, ) -> Result<ValidationResponse>
pub fn get_labellers( &self, dataset_name: &DatasetFullName, ) -> Result<Vec<UserModelMetadata>>
pub fn get_label_validation( &self, label: &LabelName, dataset_name: &DatasetFullName, model_version: &ModelVersion, ) -> Result<LabelValidation>
pub fn sync_comments( &self, source_name: &SourceFullName, comments: Vec<NewComment>, no_charge: bool, ) -> Result<SyncCommentsResponse>
pub fn sync_comments_split_on_failure( &self, source_name: &SourceFullName, comments: Vec<NewComment>, no_charge: bool, ) -> Result<SplitableRequestResponse<SyncCommentsResponse>>
pub fn sync_raw_emails( &self, source_name: &SourceFullName, documents: &[Document], transform_tag: &TransformTag, include_comments: bool, no_charge: bool, ) -> Result<SyncRawEmailsResponse>
pub fn put_emails_split_on_failure( &self, bucket_name: &BucketFullName, emails: Vec<NewEmail>, no_charge: bool, ) -> Result<SplitableRequestResponse<PutEmailsResponse>>
pub fn put_emails( &self, bucket_name: &BucketFullName, emails: Vec<NewEmail>, no_charge: bool, ) -> Result<PutEmailsResponse>
pub fn post_user( &self, user_id: &UserId, user: UpdateUser, ) -> Result<PostUserResponse>
pub fn put_comment_audio( &self, source_id: &SourceId, comment_id: &CommentId, audio_path: impl AsRef<Path>, ) -> Result<()>
pub fn upload_ixp_document( &self, source_id: &SourceId, filename: String, bytes: Vec<u8>, ) -> Result<CommentId>
pub fn upload_comment_attachment( &self, source_id: &SourceId, comment_id: &CommentId, attachment_index: usize, attachment: &PathBuf, ) -> Result<UploadAttachmentResponse>
pub fn get_ixp_document( &self, source_id: &SourceId, comment_id: &CommentId, ) -> Result<Vec<u8>>
pub fn get_attachment(&self, reference: &AttachmentReference) -> Result<Vec<u8>>
pub fn get_integrations(&self) -> Result<Vec<Integration>>
pub fn get_integration(&self, name: &IntegrationFullName) -> Result<Integration>
pub fn get_datasets(&self) -> Result<Vec<Dataset>>
pub fn get_dataset<IdentifierT>(&self, dataset: IdentifierT) -> Result<Dataset>where
IdentifierT: Into<DatasetIdentifier>,
Sourcepub fn create_ixp_dataset(&self, dataset: IxpDatasetNew) -> Result<Dataset>
pub fn create_ixp_dataset(&self, dataset: IxpDatasetNew) -> Result<Dataset>
Create a ixp dataset.
Sourcepub fn create_dataset(
&self,
dataset_name: &DatasetFullName,
options: NewDataset<'_>,
) -> Result<Dataset>
pub fn create_dataset( &self, dataset_name: &DatasetFullName, options: NewDataset<'_>, ) -> Result<Dataset>
Create a dataset.
Sourcepub fn update_dataset(
&self,
dataset_name: &DatasetFullName,
options: UpdateDataset<'_>,
) -> Result<Dataset>
pub fn update_dataset( &self, dataset_name: &DatasetFullName, options: UpdateDataset<'_>, ) -> Result<Dataset>
Update a dataset.
pub fn delete_dataset<IdentifierT>(&self, dataset: IdentifierT) -> Result<()>where
IdentifierT: Into<DatasetIdentifier>,
Sourcepub fn get_labellings<'a>(
&self,
dataset_name: &DatasetFullName,
comment_uids: impl Iterator<Item = &'a CommentUid>,
) -> Result<Vec<AnnotatedComment>>
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.
Sourcepub fn get_labellings_iter<'a>(
&'a self,
dataset_name: &'a DatasetFullName,
source_id: &'a SourceId,
return_predictions: bool,
limit: Option<usize>,
) -> LabellingsIter<'a> ⓘ
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.
Sourcepub fn get_labellings_in_bulk(
&self,
dataset_name: &DatasetFullName,
query_parameters: GetLabellingsInBulk<'_>,
) -> Result<GetAnnotationsResponse>
pub fn get_labellings_in_bulk( &self, dataset_name: &DatasetFullName, query_parameters: GetLabellingsInBulk<'_>, ) -> Result<GetAnnotationsResponse>
Get reviewed comments in bulk
Sourcepub fn update_labelling(
&self,
dataset_name: &DatasetFullName,
comment_uid: &CommentUid,
labelling: Option<&[NewLabelling]>,
entities: Option<&NewEntities>,
moon_forms: Option<&[NewMoonForm]>,
) -> Result<AnnotatedComment>
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.
Sourcepub 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>>
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.
pub fn get_streams(&self, dataset_name: &DatasetFullName) -> Result<Vec<Stream>>
pub fn get_recent_comments( &self, dataset_name: &DatasetFullName, filter: &CommentFilter, limit: usize, continuation: Option<&Continuation>, ) -> Result<RecentCommentsPage>
pub fn refresh_user_permissions(&self) -> Result<RefreshUserPermissionsResponse>
pub fn get_current_user(&self) -> Result<User>
pub fn get_users(&self) -> Result<Vec<User>>
pub fn create_user(&self, user: NewUser<'_>) -> Result<User>
pub fn dataset_summary( &self, dataset_name: &DatasetFullName, params: &SummaryRequestParams, ) -> Result<SummaryResponse>
pub fn query_dataset_csv( &self, dataset_name: &DatasetFullName, params: &QueryRequestParams, ) -> Result<String>
pub fn query_dataset( &self, dataset_name: &DatasetFullName, params: &QueryRequestParams, ) -> Result<QueryResponse>
pub fn send_welcome_email(&self, user_id: UserId) -> Result<()>
pub fn get_bucket_statistics( &self, bucket_name: &BucketFullName, ) -> Result<BucketStatistics>
pub fn get_dataset_statistics( &self, dataset_name: &DatasetFullName, params: &DatasetStatisticsRequestParams, ) -> Result<CommentStatistics>
pub fn get_source_statistics( &self, source_name: &SourceFullName, params: &SourceStatisticsRequestParams, ) -> Result<CommentStatistics>
Sourcepub fn create_bucket(
&self,
bucket_name: &BucketFullName,
options: NewBucket<'_>,
) -> Result<Bucket>
pub fn create_bucket( &self, bucket_name: &BucketFullName, options: NewBucket<'_>, ) -> Result<Bucket>
Create a new bucket.
pub fn get_buckets(&self) -> Result<Vec<Bucket>>
pub fn get_bucket<IdentifierT>(&self, bucket: IdentifierT) -> Result<Bucket>where
IdentifierT: Into<BucketIdentifier>,
pub fn delete_bucket<IdentifierT>(&self, bucket: IdentifierT) -> Result<()>where
IdentifierT: Into<BucketIdentifier>,
pub fn fetch_stream_comments( &self, stream_name: &StreamFullName, size: u32, ) -> Result<StreamBatch>
pub fn get_stream(&self, stream_name: &StreamFullName) -> Result<Stream>
pub fn advance_stream( &self, stream_name: &StreamFullName, sequence_id: StreamSequenceId, ) -> Result<()>
pub fn reset_stream( &self, stream_name: &StreamFullName, to_comment_created_at: DateTime<Utc>, ) -> Result<()>
pub fn tag_stream_exceptions( &self, stream_name: &StreamFullName, exceptions: &[StreamException<'_>], ) -> Result<()>
Sourcepub fn get_project(&self, project_name: &ProjectName) -> Result<Project>
pub fn get_project(&self, project_name: &ProjectName) -> Result<Project>
Gets a project.
Sourcepub fn get_projects(&self) -> Result<Vec<Project>>
pub fn get_projects(&self) -> Result<Vec<Project>>
Gets all projects.
Sourcepub fn create_project(
&self,
project_name: &ProjectName,
options: NewProject<'_>,
user_ids: &[UserId],
) -> Result<Project>
pub fn create_project( &self, project_name: &ProjectName, options: NewProject<'_>, user_ids: &[UserId], ) -> Result<Project>
Creates a new project.
Sourcepub fn update_project(
&self,
project_name: &ProjectName,
options: UpdateProject<'_>,
) -> Result<Project>
pub fn update_project( &self, project_name: &ProjectName, options: UpdateProject<'_>, ) -> Result<Project>
Updates an existing project.
Sourcepub fn delete_project(
&self,
project_name: &ProjectName,
force_delete: ForceDeleteProject,
) -> Result<()>
pub fn delete_project( &self, project_name: &ProjectName, force_delete: ForceDeleteProject, ) -> Result<()>
Deletes an existing project.