/*
* SpatioAPI
*
* The REST API that owns every resource in your Spatio workspace: notes, sheets, slides, tasks, calendar events, mail, chat, files, and contacts. SpatioMCP wraps this API; Spatio Desktop reads from it. You can call it directly from your own code. All requests must be authenticated with a Personal Access Token (`Authorization: Bearer pat_...`) or an OAuth 2.1 access token, and use HTTPS. Official SDKs (MIT, generated from this spec on every release): - TypeScript: https://github.com/spatio-labs/spatio-ts (`npm install @spatio-labs/spatio-ts`) - Python: https://github.com/spatio-labs/spatio-py (`pip install spatio-sdk`) - Go: https://github.com/spatio-labs/spatio-go (`go get github.com/spatio-labs/spatio-go`) This specification is generated from the platform-service Go source on every push to `main`. The spec, not hand-written documentation, is the source of truth: server stubs and SDKs are generated from it, and any drift between the spec and the running service fails CI.
*
* The version of the OpenAPI document: v1
* Contact: hello@spatio.app
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// InboxItem : A unified-feed item. Source-aware — `category` indicates which upstream platform (mail, dm, channel, mention, system) produced it; `id` is the inbox-item id (not the underlying message id).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InboxItem {
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "category")]
pub category: String,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(rename = "snippet", skip_serializing_if = "Option::is_none")]
pub snippet: Option<String>,
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
#[serde(rename = "sourceId", skip_serializing_if = "Option::is_none")]
pub source_id: Option<String>,
#[serde(rename = "accountId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub account_id: Option<Option<String>>,
#[serde(rename = "isRead", skip_serializing_if = "Option::is_none")]
pub is_read: Option<bool>,
#[serde(rename = "isMention", skip_serializing_if = "Option::is_none")]
pub is_mention: Option<bool>,
#[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
pub timestamp: Option<chrono::DateTime<chrono::FixedOffset>>,
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
}
impl InboxItem {
/// A unified-feed item. Source-aware — `category` indicates which upstream platform (mail, dm, channel, mention, system) produced it; `id` is the inbox-item id (not the underlying message id).
pub fn new(id: String, category: String) -> InboxItem {
InboxItem {
id,
category,
title: None,
snippet: None,
source: None,
source_id: None,
account_id: None,
is_read: None,
is_mention: None,
timestamp: None,
metadata: None,
}
}
}