reasoninglayer 1.0.3

Rust client SDK for the Reasoning Layer API
Documentation
//! Entity-review SDK-only DTOs.
//!
//! Most review types are auto-generated from the OpenAPI spec — see
//! [`crate::api_spec`]. This file holds the query-parameter struct
//! (`GET /reviews/pending` filters) and the summary-response shape that
//! aren't yet captured as schemas in OpenAPI.

use std::collections::BTreeMap;

use serde::{Deserialize, Serialize};

use crate::api_spec::ReviewReason;

/// Query parameters for `GET /reviews/pending`. Backend requires `tenant_id`
/// and supports optional sort/reason filters plus pagination.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ListPendingReviewsQuery {
    pub tenant_id: String,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sort: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub reason: Option<ReviewReason>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub page: Option<u32>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub page_size: Option<u32>,
}

/// Summary of pending reviews for a tenant — `GET /reviews/summary/{tenant_id}`.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ReviewSummaryResponse {
    pub total_pending: u64,
    #[serde(default)]
    pub by_reason: BTreeMap<String, u64>,
    #[serde(default)]
    pub by_sort: BTreeMap<String, u64>,
    pub high_confidence_count: u64,
    pub low_confidence_count: u64,
}