nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
use conjure_http::endpoint;
/// Service for managing demo workbooks in sandbox workspaces.
/// All endpoints validate that the provided workspace has the human-readable ID "sandbox".
#[conjure_http::conjure_endpoints(
    name = "SandboxWorkspaceService",
    use_legacy_error_serialization
)]
pub trait SandboxWorkspaceService {
    /// Returns the list of demo workbook RIDs for the given sandbox workspace.
    #[endpoint(
        method = GET,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "getDemoWorkbooks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::sandbox::api::GetDemoWorkbooksResponse,
        conjure_http::private::Error,
    >;
    /// Sets the list of demo workbook RIDs for the given sandbox workspace, replacing any existing entries.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "setDemoWorkbooks"
    )]
    fn set_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::super::objects::scout::sandbox::api::SetDemoWorkbooksRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Appends workbooks to the existing demo workbook list. If archiveOnLabelConflict is true,
    /// existing workbooks with an exact label-set match are archived along with all related
    /// resources instead of raising an error. The cascade performs a full graph traversal:
    /// starting from the workbook's data scope (asset RIDs or run RIDs), it alternates between
    /// discovering runs linked to assets and assets linked to runs until convergence. All
    /// discovered assets, runs, datasets (from both asset and run data scopes), and events
    /// (from snapshot refs and from all discovered assets) are then archived. This ensures no
    /// orphaned resources remain when demo workbooks are replaced. Partial (subset/superset)
    /// label conflicts always raise an error.
    #[endpoint(
        method = POST,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "addDemoWorkbooks"
    )]
    fn add_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::sandbox::api::AddDemoWorkbooksRequest,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Service for managing demo workbooks in sandbox workspaces.
/// All endpoints validate that the provided workspace has the human-readable ID "sandbox".
#[conjure_http::conjure_endpoints(
    name = "SandboxWorkspaceService",
    use_legacy_error_serialization
)]
pub trait AsyncSandboxWorkspaceService {
    /// Returns the list of demo workbook RIDs for the given sandbox workspace.
    #[endpoint(
        method = GET,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "getDemoWorkbooks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::sandbox::api::GetDemoWorkbooksResponse,
        conjure_http::private::Error,
    >;
    /// Sets the list of demo workbook RIDs for the given sandbox workspace, replacing any existing entries.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "setDemoWorkbooks"
    )]
    async fn set_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::super::objects::scout::sandbox::api::SetDemoWorkbooksRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Appends workbooks to the existing demo workbook list. If archiveOnLabelConflict is true,
    /// existing workbooks with an exact label-set match are archived along with all related
    /// resources instead of raising an error. The cascade performs a full graph traversal:
    /// starting from the workbook's data scope (asset RIDs or run RIDs), it alternates between
    /// discovering runs linked to assets and assets linked to runs until convergence. All
    /// discovered assets, runs, datasets (from both asset and run data scopes), and events
    /// (from snapshot refs and from all discovered assets) are then archived. This ensures no
    /// orphaned resources remain when demo workbooks are replaced. Partial (subset/superset)
    /// label conflicts always raise an error.
    #[endpoint(
        method = POST,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "addDemoWorkbooks"
    )]
    async fn add_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::sandbox::api::AddDemoWorkbooksRequest,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Service for managing demo workbooks in sandbox workspaces.
/// All endpoints validate that the provided workspace has the human-readable ID "sandbox".
#[conjure_http::conjure_endpoints(
    name = "SandboxWorkspaceService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncSandboxWorkspaceService {
    /// Returns the list of demo workbook RIDs for the given sandbox workspace.
    #[endpoint(
        method = GET,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "getDemoWorkbooks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::sandbox::api::GetDemoWorkbooksResponse,
        conjure_http::private::Error,
    >;
    /// Sets the list of demo workbook RIDs for the given sandbox workspace, replacing any existing entries.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "setDemoWorkbooks"
    )]
    async fn set_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::super::objects::scout::sandbox::api::SetDemoWorkbooksRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Appends workbooks to the existing demo workbook list. If archiveOnLabelConflict is true,
    /// existing workbooks with an exact label-set match are archived along with all related
    /// resources instead of raising an error. The cascade performs a full graph traversal:
    /// starting from the workbook's data scope (asset RIDs or run RIDs), it alternates between
    /// discovering runs linked to assets and assets linked to runs until convergence. All
    /// discovered assets, runs, datasets (from both asset and run data scopes), and events
    /// (from snapshot refs and from all discovered assets) are then archived. This ensures no
    /// orphaned resources remain when demo workbooks are replaced. Partial (subset/superset)
    /// label conflicts always raise an error.
    #[endpoint(
        method = POST,
        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
        name = "addDemoWorkbooks"
    )]
    async fn add_demo_workbooks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid",
            safe
        )]
        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::sandbox::api::AddDemoWorkbooksRequest,
    ) -> Result<(), conjure_http::private::Error>;
}