Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package sentry_protos.billing.v1.services.seer_feature_billing.v1;

import "google/protobuf/timestamp.proto";
import "sentry_protos/billing/v1/common/v1/stripe_verification.proto";

// Buys the organization's configured top-up when its Seer wallet balance is
// below the auto top-up threshold. Safe to repeat: calls with a current_ts in
Expand Down Expand Up @@ -33,4 +34,11 @@ message AutoTopUpSeerWalletResponse {
// Whether the top-up invoice was paid. Only meaningful when outcome is
// OUTCOME_BILLED.
bool paid = 3;
// Set when Stripe could not complete the top-up charge.
string failure_code = 4;
// Set when the customer must complete a 3D Secure challenge.
optional sentry_protos.billing.v1.common.v1.StripeVerification verification = 5;
// Set when outcome is OUTCOME_BILLED. The browser uses this to confirm a
// completed 3D Secure challenge with the payment endpoint.
optional string invoice_guid = 6;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
syntax = "proto3";

package sentry_protos.billing.v1.services.seer_feature_billing.v1;

import "sentry_protos/billing/v1/services/seer_feature_billing/v1/endpoint_auto_top_up_seer_wallet.proto";
import "sentry_protos/billing/v1/services/seer_wallet_config/v1/seer_wallet_config.proto";

// Replaces an organization's Seer wallet settings. When the request turns
// auto top-up on, the response includes the synchronous top-up check.
message ConfigureSeerWalletAutoTopUpRequest {
uint64 organization_id = 1;
sentry_protos.billing.v1.services.seer_wallet_config.v1.AutoTopUpConfig auto_top_up = 2;
sentry_protos.billing.v1.services.seer_wallet_config.v1.SpendConfig spend = 3;
}

message ConfigureSeerWalletAutoTopUpResponse {
// Unset when the organization had not previously saved wallet settings.
optional sentry_protos.billing.v1.services.seer_wallet_config.v1.SeerWalletConfig previous_config = 1;
sentry_protos.billing.v1.services.seer_wallet_config.v1.SeerWalletConfig config = 2;
// Set only when this request turns auto top-up on.
optional AutoTopUpSeerWalletResponse synchronous_top_up = 3;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct AutoTopUpSeerWalletRequest {
#[prost(message, optional, tag = "2")]
pub current_ts: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AutoTopUpSeerWalletResponse {
#[prost(enumeration = "auto_top_up_seer_wallet_response::Outcome", tag = "1")]
pub outcome: i32,
Expand All @@ -20,6 +20,18 @@ pub struct AutoTopUpSeerWalletResponse {
/// OUTCOME_BILLED.
#[prost(bool, tag = "3")]
pub paid: bool,
/// Set when Stripe could not complete the top-up charge.
#[prost(string, tag = "4")]
pub failure_code: ::prost::alloc::string::String,
/// Set when the customer must complete a 3D Secure challenge.
#[prost(message, optional, tag = "5")]
pub verification: ::core::option::Option<
super::super::super::common::v1::StripeVerification,
>,
/// Set when outcome is OUTCOME_BILLED. The browser uses this to confirm a
/// completed 3D Secure challenge with the payment endpoint.
#[prost(string, optional, tag = "6")]
pub invoice_guid: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `AutoTopUpSeerWalletResponse`.
pub mod auto_top_up_seer_wallet_response {
Expand Down Expand Up @@ -99,6 +111,34 @@ pub struct CheckSeerCreditsResponse {
#[prost(string, optional, tag = "2")]
pub lease_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// Replaces an organization's Seer wallet settings. When the request turns
/// auto top-up on, the response includes the synchronous top-up check.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigureSeerWalletAutoTopUpRequest {
#[prost(uint64, tag = "1")]
pub organization_id: u64,
#[prost(message, optional, tag = "2")]
pub auto_top_up: ::core::option::Option<
super::super::seer_wallet_config::v1::AutoTopUpConfig,
>,
#[prost(message, optional, tag = "3")]
pub spend: ::core::option::Option<super::super::seer_wallet_config::v1::SpendConfig>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigureSeerWalletAutoTopUpResponse {
/// Unset when the organization had not previously saved wallet settings.
#[prost(message, optional, tag = "1")]
pub previous_config: ::core::option::Option<
super::super::seer_wallet_config::v1::SeerWalletConfig,
>,
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<
super::super::seer_wallet_config::v1::SeerWalletConfig,
>,
/// Set only when this request turns auto top-up on.
#[prost(message, optional, tag = "3")]
pub synchronous_top_up: ::core::option::Option<AutoTopUpSeerWalletResponse>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetIsFreeSeerFeatureRequest {
/// A Seer feature string, as recorded in LLM proxy cost data.
Expand Down
Loading