collab: Pass down billing information in UpdatePlan message (#29929)

This PR updates the `UpdatePlan` message to include some additional
information about the user's billing subscription usage.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-05-05 11:48:31 -04:00 committed by GitHub
parent 07b4480396
commit 10bdf39497
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 137 additions and 5 deletions

View file

@ -23,6 +23,29 @@ enum Plan {
message UpdateUserPlan {
Plan plan = 1;
optional uint64 trial_started_at = 2;
optional bool is_usage_based_billing_enabled = 3;
optional SubscriptionUsage usage = 4;
}
message SubscriptionUsage {
uint32 model_requests_usage_amount = 1;
UsageLimit model_requests_usage_limit = 2;
uint32 edit_predictions_usage_amount = 3;
UsageLimit edit_predictions_usage_limit = 4;
}
message UsageLimit {
oneof variant {
Limited limited = 1;
Unlimited unlimited = 2;
}
message Limited {
uint32 limit = 1;
}
message Unlimited {}
}
message AcceptTermsOfService {}