60 lines
1.3 KiB
Rust
60 lines
1.3 KiB
Rust
#[derive(Debug, Clone, PartialEq, Eq)]
|
|||
|
|
pub struct ActorPayload {
|
||
|
|
pub actor_type: String,
|
||
|
|
pub actor_id: String,
|
||
|
|
pub session_id: Option<String>,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct SourcePayload {
|
||
|
|
pub channel: String,
|
||
|
|
pub client: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct TargetRef {
|
||
|
|
pub workspace_id: Option<String>,
|
||
|
|
pub page_id: Option<String>,
|
||
|
|
pub block_id: Option<String>,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct RequestMeta {
|
||
|
|
pub idempotency_key: Option<String>,
|
||
|
|
pub validate_only: bool,
|
||
|
|
pub dry_run: bool,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct AffectedObject {
|
||
|
|
pub object_type: String,
|
||
|
|
pub object_id: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct ResponseMeta {
|
||
|
|
pub request_id: String,
|
||
|
|
pub trace_id: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct OkPayload<T> {
|
||
|
|
pub data: T,
|
||
|
|
pub meta: ResponseMeta,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct ErrorDetail {
|
||
|
|
pub field: Option<String>,
|
||
|
|
pub reason: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||
|
|
pub struct ErrorPayload {
|
||
|
|
pub code: String,
|
||
|
|
pub message: String,
|
||
|
|
pub details: Vec<ErrorDetail>,
|
||
|
|
pub retryable: bool,
|
||
|
|
pub meta: ResponseMeta,
|
||
|
|
}
|