Skip to content

Commit

Permalink
feat: update feed action design
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Jun 21, 2024
1 parent 05fafcb commit 91db07a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
2 changes: 1 addition & 1 deletion proto/librarian/sephirah/v1/netzach.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ message NotifyFlow {

message NotifyFlowSource {
NotifyFilter filter = 1;
// must be FeedItemCollectionID
// must be `FeedConfig.id` or `FeedItemCollection.id`
librarian.v1.InternalID source_id = 2;
}

Expand Down
7 changes: 7 additions & 0 deletions proto/librarian/sephirah/v1/sephirah.proto
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ service LibrarianSephirahService {
// `Yesod` `Normal`
rpc ListFeedConfigs(ListFeedConfigsRequest) returns (ListFeedConfigsResponse);

// `Yesod` `Normal`
rpc CreateFeedActionSet(CreateFeedActionSetRequest) returns (CreateFeedActionSetResponse);
// `Yesod` `Normal`
rpc UpdateFeedActionSet(UpdateFeedActionSetRequest) returns (UpdateFeedActionSetResponse);
// `Yesod` `Normal`
rpc ListFeedActionSets(ListFeedActionSetsRequest) returns (ListFeedActionSetsResponse);

// `Yesod` `Normal`
rpc ListFeedCategories(ListFeedCategoriesRequest) returns (ListFeedCategoriesResponse);
// `Yesod` `Normal`
Expand Down
37 changes: 33 additions & 4 deletions proto/librarian/sephirah/v1/yesod.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,29 @@ message ListFeedConfigsResponse {
}
}

message CreateFeedActionSetRequest {
FeedActionSet action_set = 1;
}

message CreateFeedActionSetResponse {
librarian.v1.InternalID id = 1;
}

message UpdateFeedActionSetRequest {
FeedActionSet action_set = 1;
}

message UpdateFeedActionSetResponse {}

message ListFeedActionSetsRequest {
librarian.v1.PagingRequest paging = 1;
}

message ListFeedActionSetsResponse {
librarian.v1.PagingResponse paging = 1;
repeated FeedActionSet action_sets = 2;
}

message ListFeedCategoriesRequest {}
message ListFeedCategoriesResponse {
repeated string categories = 1;
Expand Down Expand Up @@ -172,6 +195,8 @@ message FeedConfig {
optional FeedConfigPullStatus latest_pull_status = 11;
// response only
optional string latest_pull_message = 12;
// `FeedActionSet.id`
librarian.v1.InternalID action_set_id = 13;
}

enum FeedConfigStatus {
Expand All @@ -187,6 +212,14 @@ enum FeedConfigPullStatus {
FEED_CONFIG_PULL_STATUS_FAILED = 3;
}

message FeedActionSet {
librarian.v1.InternalID id = 1;
string name = 2;
string description = 3;
// WellKnownFeedItemAction
repeated librarian.v1.FeatureRequest actions = 4;
}

// Digest information generated from origin item data
message FeedItemDigest {
librarian.v1.InternalID feed_id = 1;
Expand Down Expand Up @@ -222,8 +255,4 @@ message FeedItemCollection {
string name = 2;
string description = 3;
string category = 4;
// Auto copy source feed items to this collection
optional librarian.v1.InternalID source_feed = 5;
// WellKnownFeedItemAction
repeated librarian.v1.FeatureRequest actions = 6;
}

0 comments on commit 91db07a

Please sign in to comment.