billingMetricUnit() — supabase Function Reference
Architecture documentation for the billingMetricUnit() function in helpers.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD fced348a_ab7f_11cf_18fe_5313984546b4["billingMetricUnit()"] 92c2398a_cf4a_5148_b198_86c7e7bb2151["BillingMetric()"] 92c2398a_cf4a_5148_b198_86c7e7bb2151 -->|calls| fced348a_ab7f_11cf_18fe_5313984546b4 2c85c7d8_937d_2785_9b6c_5080fa88a0c8["UpcomingInvoice()"] 2c85c7d8_937d_2785_9b6c_5080fa88a0c8 -->|calls| fced348a_ab7f_11cf_18fe_5313984546b4 style fced348a_ab7f_11cf_18fe_5313984546b4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/Organization/BillingSettings/helpers.ts lines 50–70
export const billingMetricUnit = (pricingMetric: PricingMetric) => {
if (pricingMetricBytes.includes(pricingMetric)) {
return 'GB'
} else if (
pricingMetric.startsWith('COMPUTE_HOURS') ||
[
PricingMetric.CUSTOM_DOMAIN,
PricingMetric.IPV4,
PricingMetric.PITR_7,
PricingMetric.PITR_14,
PricingMetric.PITR_28,
PricingMetric.LOG_DRAIN,
PricingMetric.AUTH_MFA_PHONE,
PricingMetric.AUTH_MFA_WEB_AUTHN,
].includes(pricingMetric)
) {
return 'Hours'
} else {
return null
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does billingMetricUnit() do?
billingMetricUnit() is a function in the supabase codebase.
What calls billingMetricUnit()?
billingMetricUnit() is called by 2 function(s): BillingMetric, UpcomingInvoice.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free