Skip to content

Commit

Permalink
feat: update FeatureSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Sep 22, 2024
1 parent fc59e2f commit 2db99fb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 24 deletions.
15 changes: 1 addition & 14 deletions proto/librarian/porter/v1/porter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,14 @@ message GetPorterInformationResponse {
// Leave empty to use default region.
string region = 3;
// Supported features.
PorterFeatureSummary feature_summary = 4;
librarian.v1.FeatureSummary feature_summary = 4;
// JSON schema for `FeatureRequest.context_json`.
// Leave empty if not needed.
// If needed, all feature requests should deliver `context_json`.
// Can be used to configure third-party token, etc.
optional string context_json_schema = 5;
}

message PorterFeatureSummary {
repeated librarian.v1.FeatureFlag account_platforms = 1;
repeated librarian.v1.FeatureFlag app_info_sources = 2;
// WellKnownFeedSource
repeated librarian.v1.FeatureFlag feed_sources = 3;
// WellKnownNotifyDestination
repeated librarian.v1.FeatureFlag notify_destinations = 4;
// WellKnownFeedItemAction
repeated librarian.v1.FeatureFlag feed_item_actions = 5;
repeated librarian.v1.FeatureFlag feed_setters = 6;
repeated librarian.v1.FeatureFlag feed_getters = 7;
}

message EnablePorterRequest {
// Identifier of sephirah. can be randomly generated.
// porter can only be enabled by one sephirah.
Expand Down
10 changes: 1 addition & 9 deletions proto/librarian/sephirah/v1/sephirah.proto
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ message GetServerInformationResponse {
// note that there is a transmission delay between server and client.
google.protobuf.Timestamp current_time = 3;
// Valid when accessToken is provided.
optional ServerFeatureSummary feature_summary = 4;
optional librarian.v1.FeatureSummary feature_summary = 4;
// For showing to user, customizable by server owner.
ServerInstanceSummary server_instance_summary = 5;
// Plain text status report for manual inspection.
Expand Down Expand Up @@ -356,14 +356,6 @@ message ServerProtocolSummary {
string version = 1;
}

message ServerFeatureSummary {
repeated librarian.v1.FeatureFlag account_platforms = 1;
repeated librarian.v1.FeatureFlag app_info_sources = 2;
repeated librarian.v1.FeatureFlag feed_sources = 3;
repeated librarian.v1.FeatureFlag notify_destinations = 4;
repeated librarian.v1.FeatureFlag feed_item_actions = 5;
}

message ServerInstanceSummary {
string name = 1;
string description = 2;
Expand Down
4 changes: 3 additions & 1 deletion proto/librarian/sephirah/v1/tiphereth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package librarian.sephirah.v1;

import "google/protobuf/timestamp.proto";
import "librarian/v1/common.proto";
import "librarian/v1/wellknown.proto";

option csharp_namespace = "TuiHub.Protos.Librarian.Sephirah.V1";
option go_package = "github.com/tuihub/protos/pkg/librarian/sephirah/v1;v1";
Expand Down Expand Up @@ -241,7 +242,7 @@ message Porter {
librarian.v1.PorterBinarySummary binary_summary = 2;
string global_name = 3;
string region = 4;
string feature_summary = 5;
librarian.v1.FeatureSummary feature_summary = 5;
UserStatus status = 6;
// Only used in response
PorterConnectionStatus connection_status = 7;
Expand Down Expand Up @@ -302,4 +303,5 @@ message PorterGroup {
string global_name = 2;
repeated string regions = 3;
optional string context_json_schema = 4;
librarian.v1.FeatureSummary feature_summary = 5;
}
15 changes: 15 additions & 0 deletions proto/librarian/v1/wellknown.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ message FeatureRequest {
optional InternalID context_id = 4;
}

message FeatureSummary {
// WellKnownAccountPlatform
repeated librarian.v1.FeatureFlag account_platforms = 1;
// WellKnownAppInfoSource
repeated librarian.v1.FeatureFlag app_info_sources = 2;
// WellKnownFeedSource
repeated librarian.v1.FeatureFlag feed_sources = 3;
// WellKnownNotifyDestination
repeated librarian.v1.FeatureFlag notify_destinations = 4;
// WellKnownFeedItemAction
repeated librarian.v1.FeatureFlag feed_item_actions = 5;
repeated librarian.v1.FeatureFlag feed_setters = 6;
repeated librarian.v1.FeatureFlag feed_getters = 7;
}

enum WellKnownAccountPlatform {
WELL_KNOWN_ACCOUNT_PLATFORM_UNSPECIFIED = 0 [(to_string) = ""];
WELL_KNOWN_ACCOUNT_PLATFORM_STEAM = 1 [(to_string) = "steam"];
Expand Down

0 comments on commit 2db99fb

Please sign in to comment.