import { VersionInfo } from '@start9labs/start-sdk' export const v_0_2_14 = VersionInfo.of({ version: '0.2.14:0', releaseNotes: { en_US: 'Relay credit top-ups via BTCPay (operator-side).\n\n' + '• New "Set BTCPay Connection" action under StartOS → Recap Relay → Actions → Tiers. Operator drops in their BTCPay base URL, store ID, API key, and webhook secret. Empty fields disable the purchase flow; the rest of the relay keeps working.\n\n' + '• New "Set Credit Bundle Prices" action — adjust sats prices for the 1/5/10/20-credit bundles without touching code.\n\n' + '• New /relay/credits/* endpoints: GET /packages, POST /buy (mints a BTCPay invoice tied to the install), GET /invoice/:id (polls status), POST /relay/btcpay/webhook (HMAC-validated, dedupes by invoice id, grants credits to the install on InvoiceSettled).\n\n' + '• Credit ledger gains purchased_balance + purchased_total_ever fields. Spend order: tier allotment first, purchased top-up second, so a Pro user always gets their 50 monthly comped credits before dipping into anything they paid for. Purchased credits don\'t expire and bypass the per-tier Gemini cap (paid calls don\'t count against the comped-Gemini ceiling).\n\n' + '• To wire this up to BTCPay: in BTCPay → your store → Webhooks, add https:///relay/btcpay/webhook, subscribe to "An invoice has been settled", copy the auto-generated secret into the StartOS action.', }, migrations: { up: async ({ effects }) => {}, down: async ({ effects }) => {}, }, })