diff --git a/raystack/frontier/v1beta1/frontier.proto b/raystack/frontier/v1beta1/frontier.proto index 675fee1c..e2f26dca 100644 --- a/raystack/frontier/v1beta1/frontier.proto +++ b/raystack/frontier/v1beta1/frontier.proto @@ -4115,6 +4115,14 @@ message CreateUserPreferencesResponse { message ListUserPreferencesRequest { string id = 1 [(validate.rules).string.min_len = 3]; + // 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 preferences for the specific scope, + // with trait defaults for any unset preferences + string scope_type = 2; + // scope_id filters preferences by scope identifier (e.g., organization ID) + // Only applicable when scope_type is set + string scope_id = 3; } message ListUserPreferencesResponse { @@ -4129,7 +4137,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; diff --git a/raystack/frontier/v1beta1/models.proto b/raystack/frontier/v1beta1/models.proto index daa7114f..63581d24 100644 --- a/raystack/frontier/v1beta1/models.proto +++ b/raystack/frontier/v1beta1/models.proto @@ -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.", @@ -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 {