Skip to content

openagents_sdk::dashboard

Public Home summaries and portable layouts. Reads never start execution.

ItemWhat it does
Home structHome reads and dashboard edits for one signed-in session.
IssueFilter structFilters for the Home issue list.
Publish structThe body of a request that publishes a dashboard template.
Remove structThe body of a request that removes a published template.
Report structThe body of a request that reports a published template.
Request structA request body tied to the account and deployment that made it.
SaveLibrary structThe 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.

Calls GET /v1/home/projects

Home::issues

pub async fn issues(
    &self,
    filter: &IssueFilter,
    cancel: &CancellationToken,
) -> Result<IssueSummary, Error>

Returns a page of issues that match a filter.

Calls POST /v1/home/issues

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.

Calls GET /v1/home/work

Home::library

pub async fn library(&self, cancel: &CancellationToken) -> Result<Library, Error>

Returns the saved dashboard library.

Calls GET /v1/home/dashboards

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.

Calls PUT /v1/home/dashboards

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.

Calls PUT /v1/home/templates/{id}

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.

Calls GET /v1/home/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.

Calls GET /v1/home/templates/{id}

Home::directory_by_author

pub async fn directory_by_author(
    &self,
    author: &str,
    after: Option<&str>,
    cancel: &CancellationToken,
) -> Result<Directory, Error>

Lists templates published by one author.

Calls GET /v1/home/templates

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.

Calls DELETE /v1/home/templates/{id}

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.

Calls POST /v1/home/templates/{id}/report

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

  • * from openagents_dashboard