-
Notifications
You must be signed in to change notification settings - Fork 309
feat(lazer): add ignoreInvalidFeedIds flag to SDK #2529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
c194872
7d7078f
a8e1e90
2d4f5b7
6b736af
c436bff
23b6f5d
be328ab
545cfbb
9b1d540
ba506a5
8d96275
2d89de1
99b6bd1
ebd4a93
62eeb1c
82728e3
e7e626e
3f30ea2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ export type Request = | |
| deliveryFormat?: DeliveryFormat; | ||
| jsonBinaryEncoding?: JsonBinaryEncoding; | ||
| parsed?: boolean; | ||
| ignoreInvalidFeedIds?: boolean; | ||
| channel: Channel; | ||
| } | ||
| | { | ||
|
|
@@ -47,6 +48,12 @@ export type JsonBinaryData = { | |
| data: string; | ||
| }; | ||
|
|
||
| export type InvalidFeedSubscriptionDetails = { | ||
| unknownIds: number[]; | ||
| unsupportedChannels: number[]; | ||
| unstable: number[]; | ||
| }; | ||
|
|
||
| export type Response = | ||
| | { | ||
| type: "error"; | ||
|
|
@@ -56,6 +63,12 @@ export type Response = | |
| type: "subscribed"; | ||
darunrs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| subscriptionId: number; | ||
| } | ||
| | { | ||
| type: "subscribedWithIgnoredFailures"; | ||
|
||
| subscriptionId: number; | ||
| successfulFeeds: number[]; | ||
| failedFeeds: InvalidFeedSubscriptionDetails; | ||
darunrs marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| | { | ||
| type: "unsubscribed"; | ||
| subscriptionId: number; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,8 @@ pub struct SubscribeRequest { | |
| pub subscription_id: SubscriptionId, | ||
| #[serde(flatten)] | ||
| pub params: SubscriptionParams, | ||
| #[serde(default)] | ||
| pub ignore_invalid_feed_ids: Option<bool>, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, Serialize, Deserialize)] | ||
|
|
@@ -50,6 +52,10 @@ pub enum Response { | |
| #[serde(rename_all = "camelCase")] | ||
| pub struct SubscribedResponse { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SubscribedResponse should be unchanged. Add a new struct called SubscribedWithInvalidFeedIdsIgnored. It should match the new structure that is in the JS protocol. |
||
| pub subscription_id: SubscriptionId, | ||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub successful_feeds: Option<Vec<u32>>, | ||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub failed_feeds: Option<serde_json::Value>, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.