Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
The projection these were generated from predated the compute migration, so
they described /v1/visor — which the API serves at zero paths now.

No /v1/visor path survives here.
2026-09-05 18:55:38 -07:00

111 lines
4.6 KiB
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// MetricsResponse.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct MetricsResponse: Sendable, Codable, ParameterConvertible, Hashable {
/** ARR is annualized recurring revenue in cents (MRR × 12). */
public var arr: Int64?
/** Burn is total expense in cents over the period. */
public var burn: Int64?
/** Cash is the bank + processor-clearing balance in cents as of To. */
public var cash: Int64?
/** COGS is cost of goods sold in cents over the period. */
public var cogs: Int64?
/** DeferredRevenue is the customer-wallet liability in cents as of To. */
public var deferredRevenue: Int64?
/** Figures is the same snapshot rendered through books' one money formatter. */
public var figures: [Figure]?
/** From is the RFC3339 start of the reporting window, exclusive; absent for all time. */
public var from: String?
/** GrossMarginBps is GrossProfit / Revenue in basis points (7000 = 70%). */
public var grossMarginBps: Int64?
/** GrossProfit is Revenue − COGS, in cents. */
public var grossProfit: Int64?
/** MonthlyBurn is net cash burned per month in cents; 0 when not losing cash. */
public var monthlyBurn: Int64?
/** Months is the window length in whole months used to normalize MRR and burn. */
public var months: Int64?
/** MRR is monthly recurring revenue in cents. */
public var mrr: Int64?
/** NetIncome is Revenue − Burn, in cents. */
public var netIncome: Int64?
/** Period is the human window label, e.g. \"2026-07\" or \"all-time\". */
public var period: String?
/** Revenue is recognized revenue in cents over the period. */
public var revenue: Int64?
/** RunwayMonths is Cash / MonthlyBurn; -1 means infinite (the org is not burning). */
public var runwayMonths: Int64?
/** To is the RFC3339 end of the reporting window, inclusive; absent for up to now. */
public var to: String?
public init(arr: Int64? = nil, burn: Int64? = nil, cash: Int64? = nil, cogs: Int64? = nil, deferredRevenue: Int64? = nil, figures: [Figure]? = nil, from: String? = nil, grossMarginBps: Int64? = nil, grossProfit: Int64? = nil, monthlyBurn: Int64? = nil, months: Int64? = nil, mrr: Int64? = nil, netIncome: Int64? = nil, period: String? = nil, revenue: Int64? = nil, runwayMonths: Int64? = nil, to: String? = nil) {
self.arr = arr
self.burn = burn
self.cash = cash
self.cogs = cogs
self.deferredRevenue = deferredRevenue
self.figures = figures
self.from = from
self.grossMarginBps = grossMarginBps
self.grossProfit = grossProfit
self.monthlyBurn = monthlyBurn
self.months = months
self.mrr = mrr
self.netIncome = netIncome
self.period = period
self.revenue = revenue
self.runwayMonths = runwayMonths
self.to = to
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case arr
case burn
case cash
case cogs
case deferredRevenue
case figures
case from
case grossMarginBps
case grossProfit
case monthlyBurn
case months
case mrr
case netIncome
case period
case revenue
case runwayMonths
case to
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(arr, forKey: .arr)
try container.encodeIfPresent(burn, forKey: .burn)
try container.encodeIfPresent(cash, forKey: .cash)
try container.encodeIfPresent(cogs, forKey: .cogs)
try container.encodeIfPresent(deferredRevenue, forKey: .deferredRevenue)
try container.encodeIfPresent(figures, forKey: .figures)
try container.encodeIfPresent(from, forKey: .from)
try container.encodeIfPresent(grossMarginBps, forKey: .grossMarginBps)
try container.encodeIfPresent(grossProfit, forKey: .grossProfit)
try container.encodeIfPresent(monthlyBurn, forKey: .monthlyBurn)
try container.encodeIfPresent(months, forKey: .months)
try container.encodeIfPresent(mrr, forKey: .mrr)
try container.encodeIfPresent(netIncome, forKey: .netIncome)
try container.encodeIfPresent(period, forKey: .period)
try container.encodeIfPresent(revenue, forKey: .revenue)
try container.encodeIfPresent(runwayMonths, forKey: .runwayMonths)
try container.encodeIfPresent(to, forKey: .to)
}
}