Files
openapi/git
zeekay 54a04ebaa8 feat(billing,admin): canonical usage-cap + promo openapi types
Curry-precise, code-faithful types for the spend-cap / promo money surface,
aligned to the HIP-0127 primitive algebra (Meter=usage, Policy=cap verdict,
Money=cents, Schedule=period window).

billing/openapi.yaml:
- /v1/billing/spend-alerts CRUD (list, create, patch, delete) +
  /v1/billing/spend-alerts/authorize (the per-request cap verdict the cloud
  metering gate consumes).
- SpendAlert (scope {project,service}, threshold cap cents, enforce, softPct,
  rateLimitRpm, derived period/resetsAt/periodSpentCents/over/warn),
  SpendAlertCreate, SpendAlertUpdate, CapVerdict, CapReason. spend_cap and
  insufficient_balance are DISTINCT reasons.
- Faithful to commerce api/billing/spend_alerts.go + spend_cap.go and the
  cloud clients/metering verdict.

admin/openapi.yaml:
- /v1/admin/promos CRUD; Promo {percentOff,start,end,plans,active},
  PromoCreate, PromoUpdate — the admin-set discount window.

git/openapi.yaml: single-quote a 400 description whose bare commas made the
merged master fail OpenAPI 3.1 structural validation (same flow-scalar bug
class avoided in the new specs).

Regenerated hanzo.yaml + CAPABILITIES.md; full master validates OpenAPI 3.1.
2026-07-18 08:59:16 -07:00
..