Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion raystack/frontier/v1beta1/frontier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4129,7 +4129,16 @@ message CreateCurrentUserPreferencesResponse {
repeated Preference preferences = 1;
}

message ListCurrentUserPreferencesRequest {}
message ListCurrentUserPreferencesRequest {
// scope_type filters preferences by context type (e.g., "app/organization")
// If empty, returns all user preferences (global + all scoped)
// If set with scope_id, returns global preferences + preferences for the specific scope,
// with trait defaults for any unset preferences
string scope_type = 1;
// scope_id filters preferences by scope identifier (e.g., organization ID)
// Only applicable when scope_type is set
string scope_id = 2;
}

message ListCurrentUserPreferencesResponse {
repeated Preference preferences = 1;
Expand Down
12 changes: 12 additions & 0 deletions raystack/frontier/v1beta1/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,12 @@ message Preference {
string value = 3;
string resource_id = 4;
string resource_type = 5;
// scope_type defines the context type for scoped preferences (e.g., "app/organization")
// If empty, the preference is global (not scoped to any context)
string scope_type = 6;
// scope_id is the identifier of the scope context (e.g., organization ID)
// Only applicable when scope_type is set
string scope_id = 7;

google.protobuf.Timestamp created_at = 10 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the preference was created.",
Expand Down Expand Up @@ -947,6 +953,12 @@ message PreferenceRequestBody {
pattern: "^[A-Za-z0-9-_]+$"
}];
string value = 3;
// scope_type defines the context type for scoped preferences (e.g., "app/organization")
// If empty, the preference is global (not scoped to any context)
string scope_type = 4;
// scope_id is the identifier of the scope context (e.g., organization ID)
// Only applicable when scope_type is set
string scope_id = 5;
}

message CheckoutSubscriptionBody {
Expand Down
Loading