Skip to main content

ids_apis/
kdo.v1.notification.rs

1// @generated
2// This file is @generated by prost-build.
3/// Request message for ListNotifications
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct ListNotificationsRequest {
7    /// The resource name of User.
8    /// Format: users/{user_id}
9    #[prost(string, tag="1")]
10    pub user: ::prost::alloc::string::String,
11    /// The maximum number of items to return.
12    /// If unspecified, at most 50 rows will be returned.
13    /// The maximum value is 1024; values above 1024 will be coerced to 1024.
14    #[prost(int32, tag="2")]
15    pub page_size: i32,
16    /// Token of the page to retrieve.
17    #[prost(string, tag="3")]
18    pub page_token: ::prost::alloc::string::String,
19    /// 필터 표현식. 키-값 쌍을 `;`으로 구분하며, 복수 값은 `,`로 구분한다.
20    ///
21    /// 지원 필터 키:
22    /// * state=CREATED|ACKNOWLEDGED|EXPIRED  — 알림 상태 필터
23    /// * type=INFO|ERROR                     — 알림 종류 필터
24    /// * exclude_event_type=Name1,Name2,...  — 특정 event_type 제외
25    /// * symbol=A,B,C                        — 심볼 CSV 화이트리스트 필터.
26    ///                                          비어있지 않으면 Notification.symbol이
27    ///                                          목록 안에 있는 알림만 통과.
28    ///                                          symbol이 NULL(비어있음)인 알림은 제외됨.
29    ///
30    /// 자주 쓰는 event_type 이름:
31    ///    ReconcileOrphan, ReconcileDuplicate, ReconcileInvalidOrder,
32    ///    ReconcileQuantitySync, OffsetAdjustmentTimeStrategy,
33    ///    OffsetAdjustmentPositionStrategy, FundLimitExceeded, FundLimitWarning,
34    ///    HedgeError, System, Custom, QuickOrderError
35    ///
36    /// 예시:
37    /// * state=CREATED
38    /// * type=INFO
39    /// * state=CREATED;exclude_event_type=ReconcileOrphan,System
40    /// * state=CREATED;symbol=KR7252670005;exclude_event_type=ReconcileOrphan
41    #[prost(string, tag="4")]
42    pub filter: ::prost::alloc::string::String,
43}
44/// Response message for ListNotifications
45#[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct ListNotificationsResponse {
48    #[prost(message, repeated, tag="1")]
49    pub notifications: ::prost::alloc::vec::Vec<Notification>,
50    #[prost(string, tag="2")]
51    pub next_page_token: ::prost::alloc::string::String,
52}
53/// Request message for SubscribeNotifications
54#[allow(clippy::derive_partial_eq_without_eq)]
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct SubscribeNotificationsRequest {
57    /// The resource name of User.
58    /// Format: users/{user_id}
59    #[prost(string, tag="1")]
60    pub user: ::prost::alloc::string::String,
61    /// The resource name of Portfolio (optional, filter by portfolio).
62    /// Format: portfolios/{id}
63    #[prost(string, optional, tag="2")]
64    pub portfolio: ::core::option::Option<::prost::alloc::string::String>,
65}
66/// Request message for AcknowledgeNotification
67#[allow(clippy::derive_partial_eq_without_eq)]
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct AcknowledgeNotificationRequest {
70    /// The resource name of the notification.
71    /// Format: notifications/{notification_id}
72    #[prost(string, tag="1")]
73    pub name: ::prost::alloc::string::String,
74}
75/// Action to perform when notification is clicked
76#[allow(clippy::derive_partial_eq_without_eq)]
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct NotificationAction {
79    /// Type of action
80    #[prost(oneof="notification_action::Action", tags="1, 2")]
81    pub action: ::core::option::Option<notification_action::Action>,
82}
83/// Nested message and enum types in `NotificationAction`.
84pub mod notification_action {
85    /// Type of action
86    #[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(Clone, PartialEq, ::prost::Oneof)]
88    pub enum Action {
89        /// No operation
90        #[prost(message, tag="1")]
91        NoOp(super::NoOp),
92        /// Navigate to a page
93        #[prost(message, tag="2")]
94        Navigate(super::NavigateAction),
95    }
96}
97/// No operation action
98#[allow(clippy::derive_partial_eq_without_eq)]
99#[derive(Clone, Copy, PartialEq, ::prost::Message)]
100pub struct NoOp {
101}
102/// Navigation action
103#[allow(clippy::derive_partial_eq_without_eq)]
104#[derive(Clone, PartialEq, ::prost::Message)]
105pub struct NavigateAction {
106    /// Navigation target
107    #[prost(oneof="navigate_action::Target", tags="1, 2, 3")]
108    pub target: ::core::option::Option<navigate_action::Target>,
109}
110/// Nested message and enum types in `NavigateAction`.
111pub mod navigate_action {
112    /// Navigation target
113    #[allow(clippy::derive_partial_eq_without_eq)]
114#[derive(Clone, PartialEq, ::prost::Oneof)]
115    pub enum Target {
116        /// Navigate to LP page (ETF LP)
117        #[prost(message, tag="1")]
118        LpPage(super::LpPageTarget),
119        /// Navigate to Futures LP page
120        #[prost(message, tag="2")]
121        FutureLpPage(super::FutureLpPageTarget),
122        /// Navigate to MM page
123        #[prost(message, tag="3")]
124        MmPage(super::MmPageTarget),
125    }
126}
127/// LP page navigation target (ETF LP)
128#[allow(clippy::derive_partial_eq_without_eq)]
129#[derive(Clone, PartialEq, ::prost::Message)]
130pub struct LpPageTarget {
131    /// ETF code (e.g., "A252670")
132    #[prost(string, tag="1")]
133    pub etf_code: ::prost::alloc::string::String,
134    /// Fund code (e.g., "0331")
135    #[prost(string, tag="2")]
136    pub fund_code: ::prost::alloc::string::String,
137}
138/// Futures LP page navigation target
139#[allow(clippy::derive_partial_eq_without_eq)]
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct FutureLpPageTarget {
142    /// Futures symbol (e.g., "101W3000")
143    #[prost(string, tag="1")]
144    pub future_symbol: ::prost::alloc::string::String,
145    /// Fund code (e.g., "0331")
146    #[prost(string, tag="2")]
147    pub fund_code: ::prost::alloc::string::String,
148    /// ETF symbol (e.g., "A252670") — futures LP는 ETF hedge 컨텍스트에서 등록되므로 클라이언트가 관련 ETF 페이지 컨텍스트도 알 수 있도록 함
149    #[prost(string, tag="3")]
150    pub etf_symbol: ::prost::alloc::string::String,
151}
152/// MM(Market Making) page navigation target
153#[allow(clippy::derive_partial_eq_without_eq)]
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct MmPageTarget {
156    /// MM 대상 심볼 (e.g., "KR7091160002")
157    #[prost(string, tag="1")]
158    pub symbol: ::prost::alloc::string::String,
159    /// 펀드 코드
160    #[prost(string, tag="2")]
161    pub fund_code: ::prost::alloc::string::String,
162}
163/// Notification resource
164#[allow(clippy::derive_partial_eq_without_eq)]
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct Notification {
167    /// The resource name of the Notification.
168    /// Format: notifications/{notification_id}
169    #[prost(string, tag="1")]
170    pub name: ::prost::alloc::string::String,
171    /// The resource name of User.
172    /// Format: users/{user_id}
173    #[prost(string, tag="2")]
174    pub user: ::prost::alloc::string::String,
175    /// The resource name of Portfolio (optional).
176    /// Format: portfolios/{id}
177    #[prost(string, optional, tag="3")]
178    pub portfolio: ::core::option::Option<::prost::alloc::string::String>,
179    /// The id of Notification.
180    #[prost(uint64, tag="4")]
181    pub id: u64,
182    /// Notification type
183    #[prost(enumeration="NotificationType", tag="5")]
184    pub r#type: i32,
185    /// Action to perform when clicked
186    #[prost(message, optional, tag="6")]
187    pub action: ::core::option::Option<NotificationAction>,
188    /// Current state
189    #[prost(enumeration="NotificationState", tag="7")]
190    pub state: i32,
191    /// Notification title
192    #[prost(string, tag="8")]
193    pub title: ::prost::alloc::string::String,
194    /// Notification body
195    #[prost(string, tag="9")]
196    pub body: ::prost::alloc::string::String,
197    /// Additional metadata
198    #[prost(map="string, string", tag="10")]
199    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
200    /// Pre-computed navigation URL (convenience field)
201    /// e.g., "/lp/A252670"
202    #[prost(string, optional, tag="11")]
203    pub navigation_url: ::core::option::Option<::prost::alloc::string::String>,
204    /// Created timestamp
205    #[prost(message, optional, tag="12")]
206    pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
207    /// Expiration timestamp (if applicable)
208    #[prost(message, optional, tag="13")]
209    pub expire_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
210    /// Acknowledged timestamp
211    #[prost(message, optional, tag="14")]
212    pub acknowledge_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
213    /// 관련 심볼 (예: ETF 종목코드 KR7252670005).
214    /// LP/주문 관련 알림(EtfLpEvent, QuickOrderError)이 채움.
215    /// 심볼 무관 알림(System/Custom 등)은 비어있음.
216    #[prost(string, optional, tag="15")]
217    pub symbol: ::core::option::Option<::prost::alloc::string::String>,
218}
219/// Type of the notification
220#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
221#[repr(i32)]
222pub enum NotificationType {
223    TypeUnspecified = 0,
224    /// Informational notification
225    Info = 1,
226    /// Error notification
227    Error = 2,
228}
229impl NotificationType {
230    /// String value of the enum field names used in the ProtoBuf definition.
231    ///
232    /// The values are not transformed in any way and thus are considered stable
233    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
234    pub fn as_str_name(&self) -> &'static str {
235        match self {
236            NotificationType::TypeUnspecified => "TYPE_UNSPECIFIED",
237            NotificationType::Info => "INFO",
238            NotificationType::Error => "ERROR",
239        }
240    }
241    /// Creates an enum from field names used in the ProtoBuf definition.
242    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
243        match value {
244            "TYPE_UNSPECIFIED" => Some(Self::TypeUnspecified),
245            "INFO" => Some(Self::Info),
246            "ERROR" => Some(Self::Error),
247            _ => None,
248        }
249    }
250}
251/// State of the notification
252#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
253#[repr(i32)]
254pub enum NotificationState {
255    StateUnspecified = 0,
256    /// Notification has been created
257    Created = 1,
258    /// Notification has been acknowledged by user
259    Acknowledged = 2,
260    /// Notification has expired
261    Expired = 3,
262}
263impl NotificationState {
264    /// String value of the enum field names used in the ProtoBuf definition.
265    ///
266    /// The values are not transformed in any way and thus are considered stable
267    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
268    pub fn as_str_name(&self) -> &'static str {
269        match self {
270            NotificationState::StateUnspecified => "STATE_UNSPECIFIED",
271            NotificationState::Created => "CREATED",
272            NotificationState::Acknowledged => "ACKNOWLEDGED",
273            NotificationState::Expired => "EXPIRED",
274        }
275    }
276    /// Creates an enum from field names used in the ProtoBuf definition.
277    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
278        match value {
279            "STATE_UNSPECIFIED" => Some(Self::StateUnspecified),
280            "CREATED" => Some(Self::Created),
281            "ACKNOWLEDGED" => Some(Self::Acknowledged),
282            "EXPIRED" => Some(Self::Expired),
283            _ => None,
284        }
285    }
286}
287include!("kdo.v1.notification.tonic.rs");
288include!("kdo.v1.notification.serde.rs");
289// @@protoc_insertion_point(module)