diff --git a/Cargo.lock b/Cargo.lock index 9961b920..0ea6a113 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,7 +717,7 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "sentry_protos" -version = "0.8.27" +version = "0.8.28" dependencies = [ "prost", "prost-types", diff --git a/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_organization_metadata.proto b/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_organization_metadata.proto new file mode 100644 index 00000000..381ddfd4 --- /dev/null +++ b/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_organization_metadata.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package sentry_protos.billing.v1.services.billing_details.v1; + +// Fetches lightweight identity fields for an organization. Used by callers +// that need slug/name/default_user_id without pulling the full Organization +// record across service boundaries. +message GetOrganizationMetadataRequest { + uint64 organization_id = 1; +} + +message GetOrganizationMetadataResponse { + string slug = 1; + string name = 2; + // Unset when the organization has no default owner. + optional uint64 default_user_id = 3; + // Email of the default owner. + optional string default_owner_email = 4; + // Emails of every active org member whose role grants the "org:billing" + // scope (e.g. owner, manager, billing). + repeated string billing_role_emails = 5; +} diff --git a/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs b/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs index 9e7f12b8..3a05b50b 100644 --- a/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs @@ -42,6 +42,31 @@ pub struct GetBillingDetailsResponse { #[prost(message, optional, tag = "1")] pub billing_details: ::core::option::Option, } +/// Fetches lightweight identity fields for an organization. Used by callers +/// that need slug/name/default_user_id without pulling the full Organization +/// record across service boundaries. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetOrganizationMetadataRequest { + #[prost(uint64, tag = "1")] + pub organization_id: u64, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetOrganizationMetadataResponse { + #[prost(string, tag = "1")] + pub slug: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + /// Unset when the organization has no default owner. + #[prost(uint64, optional, tag = "3")] + pub default_user_id: ::core::option::Option, + /// Email of the default owner. + #[prost(string, optional, tag = "4")] + pub default_owner_email: ::core::option::Option<::prost::alloc::string::String>, + /// Emails of every active org member whose role grants the "org:billing" + /// scope (e.g. owner, manager, billing). + #[prost(string, repeated, tag = "5")] + pub billing_role_emails: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetStripePaymentDataRequest { #[prost(uint64, tag = "1")]