quicknode_sdk/admin/
logs.rs1#[cfg(feature = "rust")]
2use bon::Builder;
3#[cfg(feature = "node")]
4use napi_derive::napi;
5#[cfg(feature = "python")]
6use pyo3::pyclass;
7#[cfg(feature = "python")]
8use pyo3_stub_gen::derive::gen_stub_pyclass;
9use serde::{Deserialize, Serialize};
10
11#[cfg_attr(feature = "python", gen_stub_pyclass)]
13#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
14#[cfg_attr(feature = "node", napi(object))]
15#[cfg_attr(feature = "rust", derive(Builder))]
16#[derive(Debug, Clone, Default, Serialize)]
17pub struct GetEndpointLogsRequest {
18 pub from: String,
20 pub to: String,
22 #[serde(skip_serializing_if = "Option::is_none")]
24 pub include_details: Option<bool>,
25 #[serde(skip_serializing_if = "Option::is_none")]
27 pub limit: Option<i32>,
28 #[serde(skip_serializing_if = "Option::is_none")]
30 pub next_at: Option<String>,
31}
32
33#[cfg_attr(feature = "python", gen_stub_pyclass)]
35#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
36#[cfg_attr(feature = "node", napi(object))]
37#[derive(Debug, Clone, Serialize, Deserialize)]
38pub struct LogDetails {
39 pub request: Option<String>,
41 pub response: Option<String>,
43}
44
45#[cfg_attr(feature = "python", gen_stub_pyclass)]
47#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
48#[cfg_attr(feature = "node", napi(object))]
49#[derive(Debug, Clone, Serialize, Deserialize)]
50pub struct EndpointLog {
51 pub timestamp: String,
53 pub method: Option<String>,
55 pub network: Option<String>,
57 pub http_method: Option<String>,
59 pub status: Option<i32>,
61 pub error_code: Option<i64>,
63 pub url: Option<String>,
65 pub request_id: Option<String>,
67 pub details: Option<LogDetails>,
69}
70
71#[cfg_attr(feature = "python", gen_stub_pyclass)]
73#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
74#[cfg_attr(feature = "node", napi(object))]
75#[derive(Debug, Clone, Serialize, Deserialize)]
76pub struct GetEndpointLogsResponse {
77 #[serde(default)]
79 pub data: Vec<EndpointLog>,
80 pub next_at: Option<String>,
82}
83
84#[cfg_attr(feature = "python", gen_stub_pyclass)]
86#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
87#[cfg_attr(feature = "node", napi(object))]
88#[derive(Debug, Clone, Serialize, Deserialize)]
89pub struct GetLogDetailsResponse {
90 pub data: Option<LogDetails>,
92}