misardev 1.1.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 close_friends;
mod collections;
mod comments;
mod connectors;
mod dm;
mod domains;
mod feed;
mod gallery;
mod github;
mod highlights;
mod notifications;
mod organizations;
mod posts;
mod profile;
mod projects;
mod rag;
mod reports;
mod search;
mod skills;
mod social;
mod stories;
mod tags;
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 close_friends::CloseFriendsResource;
pub use collections::CollectionsResource;
pub use comments::CommentsResource;
pub use connectors::ConnectorsResource;
pub use dm::DmResource;
pub use domains::DomainsResource;
pub use feed::FeedResource;
pub use gallery::GalleryResource;
pub use github::GithubResource;
pub use highlights::HighlightsResource;
pub use notifications::NotificationsResource;
pub use organizations::OrganizationsResource;
pub use posts::PostsResource;
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 social::SocialResource;
pub use stories::StoriesResource;
pub use tags::TagsResource;
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 = 183;

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 }
    }

    /// Your close-friends list for stories.
    pub fn close_friends(&self) -> CloseFriendsResource<'_> {
        CloseFriendsResource { t: &self.transport }
    }

    /// Saved-post collections: create, rename, delete, add and remove posts.
    pub fn collections(&self) -> CollectionsResource<'_> {
        CollectionsResource { t: &self.transport }
    }

    /// Your comments: edit, delete; like and unlike any comment.
    pub fn comments(&self) -> CommentsResource<'_> {
        CommentsResource { t: &self.transport }
    }

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

    /// Direct messages: threads and requests, messages, read state, unread counts.
    pub fn dm(&self) -> DmResource<'_> {
        DmResource { t: &self.transport }
    }

    /// Domains: availability lookup, search, checkout, your domains, and their DNS records.
    pub fn domains(&self) -> DomainsResource<'_> {
        DomainsResource { t: &self.transport }
    }

    /// The Following feed and the ranked For you feed.
    pub fn feed(&self) -> FeedResource<'_> {
        FeedResource { 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 }
    }

    /// Story highlights on a profile: create, edit, delete, add and remove stories.
    pub fn highlights(&self) -> HighlightsResource<'_> {
        HighlightsResource { 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 }
    }

    /// Posts: the explore grid, one post, share to feed, edit; likes, saves, comments, saved posts, share to a DM.
    pub fn posts(&self) -> PostsResource<'_> {
        PostsResource { t: &self.transport }
    }

    /// Public builder profiles; follow, block and mute people.
    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 }
    }

    /// Your relationship with a person, and people suggestions.
    pub fn social(&self) -> SocialResource<'_> {
        SocialResource { t: &self.transport }
    }

    /// Stories: post, the tray, read one, mark seen, viewers, reply, and your posts to share.
    pub fn stories(&self) -> StoriesResource<'_> {
        StoriesResource { t: &self.transport }
    }

    /// One hashtag's posts.
    pub fn tags(&self) -> TagsResource<'_> {
        TagsResource { 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 }
    }
}