|
|
@@ -2,7 +2,7 @@
|
|
|
//! used across publishers, agents and routers.
|
|
|
|
|
|
use {
|
|
|
- crate::router::{JsonUpdate, SubscriptionParams},
|
|
|
+ crate::router::{JsonUpdate, PriceFeedId, SubscriptionParams},
|
|
|
derive_more::From,
|
|
|
serde::{Deserialize, Serialize},
|
|
|
};
|
|
|
@@ -40,6 +40,7 @@ pub struct UnsubscribeRequest {
|
|
|
pub enum Response {
|
|
|
Error(ErrorResponse),
|
|
|
Subscribed(SubscribedResponse),
|
|
|
+ SubscribedWithInvalidFeedIdsIgnored(SubscribedWithInvalidFeedIdsIgnoredResponse),
|
|
|
Unsubscribed(UnsubscribedResponse),
|
|
|
SubscriptionError(SubscriptionErrorResponse),
|
|
|
StreamUpdated(StreamUpdatedResponse),
|
|
|
@@ -52,6 +53,22 @@ pub struct SubscribedResponse {
|
|
|
pub subscription_id: SubscriptionId,
|
|
|
}
|
|
|
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
|
+#[serde(rename_all = "camelCase")]
|
|
|
+pub struct InvalidFeedSubscriptionDetails {
|
|
|
+ pub unknown_ids: Vec<PriceFeedId>,
|
|
|
+ pub unsupported_channels: Vec<PriceFeedId>,
|
|
|
+ pub unstable: Vec<PriceFeedId>,
|
|
|
+}
|
|
|
+
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
|
+#[serde(rename_all = "camelCase")]
|
|
|
+pub struct SubscribedWithInvalidFeedIdsIgnoredResponse {
|
|
|
+ pub subscription_id: SubscriptionId,
|
|
|
+ pub subscribed_feed_ids: Vec<PriceFeedId>,
|
|
|
+ pub ignored_invalid_feed_ids: InvalidFeedSubscriptionDetails,
|
|
|
+}
|
|
|
+
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct UnsubscribedResponse {
|