Skip to content

Commit 9ac58d9

Browse files
armenzgcursoragent
andcommitted
chore(billing): remove deprecated v1 proto fields
Drop deprecated billing-platform proto fields/messages/enums that no longer have consumers and reserve their field names/numbers to prevent reuse. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d3a4b59 commit 9ac58d9

9 files changed

Lines changed: 39 additions & 236 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## Unreleased
2+
3+
### Breaking Changes
4+
5+
#### Billing
6+
7+
- Remove deprecated fields, messages, and enums from billing v1 protos:
8+
`SKUConfig`, `SharedSKUBudget`, `PricingTier`, and `TieredPricingRate`
9+
in `services/contract/v1/pricing_config.proto`; `BillingChannel`,
10+
`ExternalBillingProvider`, and `Address` in
11+
`services/contract/v1/billing_config.proto`; `FeatureOption` and
12+
`FeatureOptions` in `contract_metadata.proto`; `SKUUsageSummary` and
13+
`SharedBudgetUsageSummary` in `endpoint_usage_pricer.proto`; the legacy
14+
`Address` in `billing_details.proto`; and deprecated response fields
15+
`seats` and `contracts`. All removed field numbers and names are now reserved.
16+
117
## 0.13.0
218

319
### New Features ✨

proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,9 @@ package sentry_protos.billing.v1.services.billing_details.v1;
44

55
import "sentry_protos/billing/v1/common/v1/address.proto";
66

7-
message Address {
8-
option deprecated = true;
9-
10-
string city = 1;
11-
string region = 2;
12-
string country_code = 3;
13-
string postal_code = 4;
14-
string address_line_1 = 5;
15-
string address_line_2 = 6;
16-
string address_line_3 = 7;
17-
}
18-
197
message BillingDetails {
20-
Address address = 1 [deprecated = true];
8+
reserved 1;
9+
reserved "address";
2110
string display_address = 2;
2211
optional string company_name = 3;
2312
optional string billing_email = 4;

proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,9 @@ enum BillingType {
1616
BILLING_TYPE_PARTNER = 3;
1717
}
1818

19-
// The channel through which the contract is billed.
20-
enum BillingChannel {
21-
option deprecated = true;
22-
23-
BILLING_CHANNEL_UNSPECIFIED = 0;
24-
BILLING_CHANNEL_SELF_SERVE = 1;
25-
BILLING_CHANNEL_SALES = 2;
26-
BILLING_CHANNEL_PARTNER = 3;
27-
}
28-
29-
// The external billing provider used to process payments for the contract.
30-
enum ExternalBillingProvider {
31-
option deprecated = true;
32-
33-
EXTERNAL_BILLING_PROVIDER_UNSPECIFIED = 0;
34-
EXTERNAL_BILLING_PROVIDER_STRIPE = 1;
35-
EXTERNAL_BILLING_PROVIDER_VERCEL = 2;
36-
}
37-
38-
message Address {
39-
option deprecated = true;
40-
41-
string city = 1;
42-
string region = 2;
43-
string country_code = 3;
44-
string postal_code = 4;
45-
string address_line_1 = 5;
46-
string address_line_2 = 6;
47-
string address_line_3 = 7;
48-
}
49-
5019
message BillingConfig {
5120
BillingType billing_type = 1;
5221

53-
// Remaining fields are deprecated
54-
BillingChannel channel = 2 [deprecated = true];
55-
ExternalBillingProvider external_billing_provider = 3 [deprecated = true];
56-
Address address = 4 [deprecated = true];
57-
// Use PricingConfig.billing_period_start_date and PricingConfig.billing_period_end_date
58-
Date contract_start_date = 5 [deprecated = true];
59-
Date contract_end_date = 6 [deprecated = true];
22+
reserved 2 to 6;
23+
reserved "channel", "external_billing_provider", "address", "contract_start_date", "contract_end_date";
6024
}

proto/sentry_protos/billing/v1/services/contract/v1/contract_metadata.proto

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@ message OptionValue {
1212
}
1313
}
1414

15-
message FeatureOption {
16-
option deprecated = true;
17-
18-
string key = 1;
19-
bool enabled = 2;
20-
}
21-
22-
message FeatureOptions {
23-
option deprecated = true;
24-
25-
repeated FeatureOption options = 1;
26-
}
27-
2815
message MetadataOption {
2916
string key = 1;
3017
OptionValue value = 2;
@@ -43,10 +30,6 @@ message ContractMetadata {
4330
MetadataOptions custom_options = 6;
4431
sentry_protos.billing.v1.FeatureOptions billing_features = 7;
4532
string package_uid = 9;
46-
47-
uint64 package_id = 8 [deprecated = true];
48-
// Includes information like plan ID, tier, etc.
49-
MetadataOptions package_metadata = 4 [deprecated = true];
50-
// Entitlements, used in frontend features or gating access to certain features.
51-
FeatureOptions features = 5 [deprecated = true]; //DEPRECATED: use billing_features instead
33+
reserved 4, 5, 8;
34+
reserved "package_metadata", "features", "package_id";
5235
}

proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_uninvoiced_contracts.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ syntax = "proto3";
33
package sentry_protos.billing.v1.services.contract.v1;
44

55
import "google/protobuf/timestamp.proto";
6-
import "sentry_protos/billing/v1/services/contract/v1/contract.proto";
76

87
message GetUninvoicedContractsRequest {
98
// Returns Contracts whose current billing period ends before this time and
@@ -19,7 +18,8 @@ message GetUninvoicedContractsRequest {
1918
}
2019

2120
message GetUninvoicedContractsResponse {
22-
repeated Contract contracts = 1 [deprecated = true]; //DEPRECATED: use contract_ids instead
21+
reserved 1;
22+
reserved "contracts";
2323
// True if additional matching contracts existed beyond max_items and were
2424
// not included in this response.
2525
bool truncated = 2;

proto/sentry_protos/billing/v1/services/contract/v1/pricing_config.proto

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,6 @@ package sentry_protos.billing.v1.services.contract.v1;
55
import "google/protobuf/empty.proto";
66
import "google/protobuf/timestamp.proto";
77
import "sentry_protos/billing/v1/services/contract/v1/billing_config.proto";
8-
import "sentry_protos/billing/v1/services/contract/v1/sku.proto";
9-
import "sentry_protos/billing/v1/sku.proto";
10-
11-
message PricingTier {
12-
option deprecated = true;
13-
14-
int64 start = 1;
15-
int64 end = 2;
16-
int64 rate_per_unit_cpe = 3;
17-
}
18-
19-
message TieredPricingRate {
20-
option deprecated = true;
21-
22-
repeated PricingTier tiers = 1;
23-
}
24-
25-
message SKUConfig {
26-
option deprecated = true;
27-
28-
SKU sku = 1 [deprecated = true]; //DEPRECATED: use billing_sku instead
29-
// Base price for the SKU (upgraded reserved volumes or add-on activation fees)
30-
uint64 base_price_cents = 2;
31-
optional uint64 payg_budget_cents = 3;
32-
uint64 reserved_volume = 4 [deprecated = true]; //DEPRECATED: use signed reserved_units instead for support for unlimited/reserved budget categories
33-
TieredPricingRate payg_rate = 5;
34-
TieredPricingRate reserved_rate = 6; // for reserved budget SKUs
35-
36-
oneof reserved_units {
37-
bool is_unlimited = 7;
38-
uint64 num_reserved_units = 8; // the type communicates whether the SKU is unlimited or not, additionally reserved budget SKUs have a non-zero reserved_rate in addition to 0 reserved_units
39-
}
40-
41-
sentry_protos.billing.v1.SKU billing_sku = 9;
42-
}
43-
44-
// Represents a budget that is collectively used by one or more SKUs,
45-
// allowing multiple SKUs to draw from the same reserved budget.
46-
message SharedSKUBudget {
47-
option deprecated = true;
48-
49-
repeated SKU skus = 1 [deprecated = true]; //DEPRECATED: use billing_skus instead
50-
uint64 reserved_budget_cents = 2;
51-
uint64 payg_budget_cents = 3;
52-
repeated sentry_protos.billing.v1.SKU billing_skus = 4;
53-
}
548

559
message PAYGBudget {
5610
uint64 budget_cents = 1;
@@ -88,9 +42,6 @@ message PricingConfig {
8842
optional google.protobuf.Timestamp usage_watermark_ts = 9;
8943

9044
repeated UserConfig user_config = 10;
91-
92-
uint64 base_price_cents = 6 [deprecated = true]; // DEPRECATED: use package instead.
93-
repeated SKUConfig sku_configs = 1 [deprecated = true]; // DEPRECATED: use package/user_parameters instead.
94-
repeated SharedSKUBudget shared_sku_budgets = 2 [deprecated = true]; // DEPRECATED: use package/user_parameters instead.
95-
uint64 max_spend_cents = 5 [deprecated = true]; // DEPRECATED: use user_parameters instead
45+
reserved 1, 2, 5, 6;
46+
reserved "sku_configs", "shared_sku_budgets", "max_spend_cents", "base_price_cents";
9647
}

proto/sentry_protos/billing/v1/services/usage/v1/endpoint_usage.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ message GetUsageResponse {
3434
// Usage broken down by day, each containing per-category usage.
3535
repeated DailyUsage days = 1;
3636
repeated DailySeatUsage seat_days = 3;
37-
38-
repeated CategorySeatUsage seats = 2 [deprecated = true]; // DEPRECATED: use seat_days
37+
reserved 2;
38+
reserved "seats";
3939

4040
// The latest timestamp of usage data included in this response (inclusive
4141
// — there is at least one row at exactly this timestamp). Callers persist

proto/sentry_protos/billing/v1/services/usage_pricer/v1/endpoint_usage_pricer.proto

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ syntax = "proto3";
33
package sentry_protos.billing.v1.services.usage_pricer.v1;
44

55
import "google/protobuf/timestamp.proto";
6-
import "sentry_protos/billing/v1/sku.proto";
76

87
message UsagePricerRequest {
98
uint64 organization_id = 1;
@@ -16,28 +15,6 @@ message GetPriceForContractRequest {
1615
google.protobuf.Timestamp usage_start_watermark_ts = 2;
1716
}
1817

19-
message SKUUsageSummary {
20-
// use LineItemUsageSummary instead
21-
option deprecated = true;
22-
23-
sentry_protos.billing.v1.SKU sku = 1;
24-
// Net cents consumed by this SKU in the billing period (after credits/trials applied).
25-
uint64 payg_spend_cents = 2;
26-
// Total units consumed by this SKU in the billing period.
27-
uint64 usage_volume = 3;
28-
}
29-
30-
message SharedBudgetUsageSummary {
31-
// use SharedLineItemUsageSummary instead
32-
option deprecated = true;
33-
34-
repeated sentry_protos.billing.v1.SKU skus = 1;
35-
// Net cents consumed across all SKUs in this shared budget (after credits/trials applied).
36-
uint64 payg_spend_cents = 2;
37-
// Per-SKU breakdown within the shared budget.
38-
repeated SKUUsageSummary sku_summaries = 3;
39-
}
40-
4118
message LineItemUsageSummary {
4219
// Refers to uid in sentry_protos.billing.v1.common.v1.LineItemDetails
4320
string line_item_uid = 1;
@@ -58,11 +35,8 @@ message SharedLineItemUsageSummary {
5835
}
5936

6037
message UsagePricerResponse {
61-
// use line_item_summaries
62-
repeated SKUUsageSummary sku_summaries = 1 [deprecated = true];
63-
64-
// use shared_line_item_summaries
65-
repeated SharedBudgetUsageSummary shared_budget_summaries = 2 [deprecated = true];
38+
reserved 1, 2;
39+
reserved "sku_summaries", "shared_budget_summaries";
6640

6741
repeated LineItemUsageSummary line_item_summaries = 3;
6842

0 commit comments

Comments
 (0)