openapp-sdk 0.1.58

Official Rust SDK for OpenApp — Physical Security as a Service (PSaaS): API-first access control for doors, gates, intercom, invitations, and audit.
Documentation
<!-- markdownlint-disable MD013 -->
# `openapp-sdk` (Rust)

Official Rust SDK for **OpenApp — Physical Security as a Service (PSaaS)**:
access control, intercom, invitations, and entity actions over the public HTTP API.

- Docs: [openapp.house/docs/sdk/rust]https://openapp.house/docs/sdk/rust/
- OpenAPI: [openapp-openapi.json]https://openapp.house/docs/api-spec/openapp-openapi.json

## Installation

From the monorepo, add it as a path dependency:

```toml
[dependencies]
openapp-sdk = { path = "packages/sdk/rust" }
```

Release automation publishes the core crates and this facade crate to crates.io
from `sdk-rust-v*` tags. Once the published artifacts are available in your
registry, consumers can use the normal crates.io dependency form:

```toml
[dependencies]
openapp-sdk = "0.1"
```

## Requirements

- Rust stable (currently 1.95.x; MSRV declared in `Cargo.toml`)
- OpenApp API key

## Quick start

```rust
use openapp_sdk::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::builder()
        .api_key(std::env::var("OPENAPP_API_KEY")?)
        .build()?;

    let orgs = client.orgs().list().await?;
    println!("{orgs:?}");
    Ok(())
}
```

## Error handling

```rust
use openapp_sdk::{Client, SdkError};

async fn list_orgs(api_key: String) {
    let client = match Client::builder().api_key(api_key).build() {
        Ok(c) => c,
        Err(err) => {
            eprintln!("config/auth error: {err}");
            return;
        }
    };

    match client.orgs().list().await {
        Ok(orgs) => println!("{orgs:?}"),
        Err(SdkError::Auth(msg)) => eprintln!("auth error: {msg}"),
        Err(SdkError::Api(api)) => eprintln!("api error: {} {}", api.status, api.message),
        Err(other) => eprintln!("transport/sdk error: {other}"),
    }
}
```

## Maintainer docs

Internal development, CI, and release notes are documented in
[`../docs/RUST_MAINTAINERS.md`](../docs/RUST_MAINTAINERS.md) and
[`../docs/SDK_DEVELOPMENT_POLICY.md`](../docs/SDK_DEVELOPMENT_POLICY.md).

## Documentation

- [Agents & automation]https://openapp.house/docs/guides/agents/overview/
- [API reference]https://openapp.house/docs/api-reference/
- [Build an access-control agent]https://openapp.house/docs/guides/agents/build-access-control-agent/