misardev 1.0.0

Async Rust client for the Misar.Dev API: create projects, write files, build and deploy, start from templates, run OpenAI-compatible chat completions, search code and read usage. Retries, typed plan-limit errors, SSE streaming.
Documentation
// GENERATED by scripts/generate-sdk-resources.mjs from sdks/manifest.json.
// Do not edit by hand — change the route, run `pnpm sdk:sync`, and regenerate.

//! The generated resource layer: one type per MisarDev resource, one method
//! per route, reached from the client as `dev.<resource>()`.

mod account;
mod api_keys;
mod audit;
mod billing;
mod builds;
mod chat;
mod checkpoints;
mod connectors;
mod domains;
mod gallery;
mod github;
mod notifications;
mod organizations;
mod profile;
mod projects;
mod rag;
mod reports;
mod search;
mod skills;
mod templates;
mod usage;

#[cfg(test)]
mod operations_test;

pub use account::AccountResource;
pub use api_keys::ApiKeysResource;
pub use audit::AuditResource;
pub use billing::BillingResource;
pub use builds::BuildsResource;
pub use chat::ChatResource;
pub use checkpoints::CheckpointsResource;
pub use connectors::ConnectorsResource;
pub use domains::DomainsResource;
pub use gallery::GalleryResource;
pub use github::GithubResource;
pub use notifications::NotificationsResource;
pub use organizations::OrganizationsResource;
pub use profile::ProfileResource;
pub use projects::ProjectsResource;
pub use rag::RagResource;
pub use reports::ReportsResource;
pub use search::SearchResource;
pub use skills::SkillsResource;
pub use templates::TemplatesResource;
pub use usage::UsageResource;

/// Number of methods and streams the generated layer covers — every
/// operation in `sdks/manifest.json`.
pub const OPERATION_COUNT: usize = 109;

impl crate::MisarDev {
    /// Account API keys (with expiry and IP allowlists) and your data export.
    pub fn account(&self) -> AccountResource<'_> {
        AccountResource { t: &self.transport }
    }

    /// API keys — create, list, revoke.
    pub fn api_keys(&self) -> ApiKeysResource<'_> {
        ApiKeysResource { t: &self.transport }
    }

    /// Your account's audit log.
    pub fn audit(&self) -> AuditResource<'_> {
        AuditResource { t: &self.transport }
    }

    /// Plans, plan comparison, subscription, checkout, plan switch.
    pub fn billing(&self) -> BillingResource<'_> {
        BillingResource { t: &self.transport }
    }

    /// Recent builds across your projects.
    pub fn builds(&self) -> BuildsResource<'_> {
        BuildsResource { t: &self.transport }
    }

    /// OpenAI-compatible chat completions (plain and streamed) and the studio build conversation stream.
    pub fn chat(&self) -> ChatResource<'_> {
        ChatResource { t: &self.transport }
    }

    /// Saved project snapshots: rename, restore, delete.
    pub fn checkpoints(&self) -> CheckpointsResource<'_> {
        CheckpointsResource { t: &self.transport }
    }

    /// Connector catalogue, per-account enable state, and per-project connections.
    pub fn connectors(&self) -> ConnectorsResource<'_> {
        ConnectorsResource { t: &self.transport }
    }

    /// Custom-domain availability lookup.
    pub fn domains(&self) -> DomainsResource<'_> {
        DomainsResource { t: &self.transport }
    }

    /// The public community gallery, and likes.
    pub fn gallery(&self) -> GalleryResource<'_> {
        GalleryResource { t: &self.transport }
    }

    /// The linked GitHub account: read it or disconnect it.
    pub fn github(&self) -> GithubResource<'_> {
        GithubResource { t: &self.transport }
    }

    /// In-app notifications and read state.
    pub fn notifications(&self) -> NotificationsResource<'_> {
        NotificationsResource { t: &self.transport }
    }

    /// Organizations, members and invitations.
    pub fn organizations(&self) -> OrganizationsResource<'_> {
        OrganizationsResource { t: &self.transport }
    }

    /// Public builder profiles, follow and unfollow.
    pub fn profile(&self) -> ProfileResource<'_> {
        ProfileResource { t: &self.transport }
    }

    /// Projects end to end: create, edit, files, builds, deploys, domains, env vars, collaborators, knowledge, skills, tools, export.
    pub fn projects(&self) -> ProjectsResource<'_> {
        ProjectsResource { t: &self.transport }
    }

    /// Index a project's code for semantic search, query it, clear it.
    pub fn rag(&self) -> RagResource<'_> {
        RagResource { t: &self.transport }
    }

    /// Report abusive content.
    pub fn reports(&self) -> ReportsResource<'_> {
        ReportsResource { t: &self.transport }
    }

    /// Web-grounded answers with citations, and search across your own code.
    pub fn search(&self) -> SearchResource<'_> {
        SearchResource { t: &self.transport }
    }

    /// Your Misar.AI skills library, read-only.
    pub fn skills(&self) -> SkillsResource<'_> {
        SkillsResource { t: &self.transport }
    }

    /// Starter templates: browse, create, remix, and start a project from one.
    pub fn templates(&self) -> TemplatesResource<'_> {
        TemplatesResource { t: &self.transport }
    }

    /// Usage for a period, your plan's allowances, and usage events.
    pub fn usage(&self) -> UsageResource<'_> {
        UsageResource { t: &self.transport }
    }
}