openagents_sdk::dashboard
Public Home summaries and portable layouts. Reads never start execution.
| Item | What it does |
|---|---|
Home struct | Home reads and dashboard edits for one signed-in session. |
IssueFilter struct | Filters for the Home issue list. |
Publish struct | The body of a request that publishes a dashboard template. |
Remove struct | The body of a request that removes a published template. |
Report struct | The body of a request that reports a published template. |
Request struct | A request body tied to the account and deployment that made it. |
SaveLibrary struct | The body of a request that saves the dashboard library. |
Home
pub struct Home<'a> {}
Home reads and dashboard edits for one signed-in session.
Home::bind
pub fn bind<T>(&self, body: T) -> Request<T>
Ties a request body to this session's account and deployment.
Home::projects
pub async fn projects(&self, cancel: &CancellationToken) -> Result<Vec<Project>, Error>
Lists the projects shown on Home.
Home::issues
pub async fn issues(
&self,
filter: &IssueFilter,
cancel: &CancellationToken,
) -> Result<IssueSummary, Error>
Returns a page of issues that match a filter.
Home::work
pub async fn work(
&self,
after: Option<&str>,
cancel: &CancellationToken,
) -> Result<WorkPage, Error>
Returns a page of recent work, starting after an optional cursor.
Home::library
pub async fn library(&self, cancel: &CancellationToken) -> Result<Library, Error>
Returns the saved dashboard library.
Home::save_request
pub fn save_request(&self, library: Library) -> Result<Request<SaveLibrary>, Error>
Checks a library and builds a request that saves it.
Home::save
pub async fn save(
&self,
request: &Request<SaveLibrary>,
cancel: &CancellationToken,
) -> Result<Library, Error>
Saves the dashboard library and returns the saved copy.
Home::publish_request
pub fn publish_request(
&self,
package: Package,
visibility: Visibility,
expected_revision: u64,
) -> Result<Request<Publish>, Error>
Checks a package and builds a request that publishes it.
Home::publish
pub async fn publish(
&self,
id: &str,
request: &Request<Publish>,
cancel: &CancellationToken,
) -> Result<Listing, Error>
Publishes a template under an ID and returns its listing.
Home::directory
pub async fn directory(
&self,
search: &str,
after: Option<&str>,
mine: bool,
cancel: &CancellationToken,
) -> Result<Directory, Error>
Searches the template directory, optionally only your own templates.
Home::template
pub async fn template(
&self,
id: &str,
version: Option<u64>,
cancel: &CancellationToken,
) -> Result<Listing, Error>
Returns a template's listing, at a given version or the latest.
Home::remove_request
pub fn remove_request(&self, expected_revision: u64) -> Result<Request<Remove>, Error>
Builds a request that removes a published template.
Home::remove
pub async fn remove(
&self,
id: &str,
request: &Request<Remove>,
cancel: &CancellationToken,
) -> Result<Listing, Error>
Removes a published template and returns its final listing.
Home::report
pub async fn report(
&self,
id: &str,
request: &Request<Report>,
cancel: &CancellationToken,
) -> Result<serde_json::Value, Error>
Reports a published template for review.
IssueFilter
pub struct IssueFilter {
pub scope: Scope,
pub mine: bool,
pub assignee: Option<String>,
pub labels: Vec<String>,
pub page: u32,
}
Filters for the Home issue list.
Publish
pub struct Publish {
pub request_id: String,
pub expected_revision: u64,
pub package: Package,
pub visibility: Visibility,
}
The body of a request that publishes a dashboard template.
Remove
pub struct Remove {
pub request_id: String,
pub expected_revision: u64,
}
The body of a request that removes a published template.
Report
pub struct Report {
pub request_id: String,
pub reason: String,
}
The body of a request that reports a published template.
Request
pub struct Request<T> {
pub body: T,
}
A request body tied to the account and deployment that made it.
SaveLibrary
pub struct SaveLibrary {
pub request_id: String,
pub expected_revision: u64,
pub library: Library,
}
The body of a request that saves the dashboard library.
Re-exported from other crates
*fromopenagents_dashboard