Skip to main content

DocumentsResource

Struct DocumentsResource 

Source
pub struct DocumentsResource<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> DocumentsResource<'a>

Source

pub async fn list(&self) -> Result<ListDocumentsResponse>

GET /api/v1/documents

Source

pub async fn get(&self, id: &str) -> Result<DocumentSummary>

GET /api/v1/documents/{id}

Source

pub async fn delete(&self, id: &str) -> Result<()>

DELETE /api/v1/documents/{id}

Source

pub async fn status(&self, id: &str) -> Result<TrackStatusResponse>

GET /api/v1/documents/{id}/status

Source

pub async fn upload_text(&self, body: &Value) -> Result<UploadDocumentResponse>

POST /api/v1/documents/upload/text

Source

pub async fn scan(&self, req: &ScanRequest) -> Result<ScanResponse>

POST /api/v1/documents/scan

Source

pub async fn deletion_impact(&self, id: &str) -> Result<DeletionImpactResponse>

GET /api/v1/documents/{id}/deletion-impact

Source

pub async fn track(&self, track_id: &str) -> Result<TrackStatusResponse>

GET /api/v1/documents/track/{track_id}

Source

pub async fn get_lineage(&self, id: &str) -> Result<DocumentFullLineage>

GET /api/v1/documents/{id}/lineage

Returns complete document lineage (persisted pipeline lineage + metadata). @implements F5 — Single API call retrieves complete lineage tree.

Source

pub async fn get_metadata(&self, id: &str) -> Result<Value>

GET /api/v1/documents/{id}/metadata

Returns all document metadata stored in KV storage. @implements F1 — All document metadata retrievable.

Source

pub async fn delete_all(&self) -> Result<Value>

DELETE /api/v1/documents — Delete all documents in workspace.

Source

pub async fn reprocess(&self) -> Result<Value>

POST /api/v1/documents/reprocess — Retry all failed documents.

Source

pub async fn recover_stuck(&self) -> Result<Value>

POST /api/v1/documents/recover-stuck — Recover stuck processing docs.

Source

pub async fn retry_chunks(&self, id: &str) -> Result<Value>

POST /api/v1/documents/{id}/retry-chunks — Retry failed chunks for a document.

Source

pub async fn failed_chunks(&self, id: &str) -> Result<Vec<Value>>

GET /api/v1/documents/{id}/failed-chunks — List failed chunks for a document.

Auto Trait Implementations§

§

impl<'a> Freeze for DocumentsResource<'a>

§

impl<'a> !RefUnwindSafe for DocumentsResource<'a>

§

impl<'a> Send for DocumentsResource<'a>

§

impl<'a> Sync for DocumentsResource<'a>

§

impl<'a> Unpin for DocumentsResource<'a>

§

impl<'a> UnsafeUnpin for DocumentsResource<'a>

§

impl<'a> !UnwindSafe for DocumentsResource<'a>

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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