import type { Result } from '@stacksjs/error-handling'; /** * Provision the products and prices declared in `config/saas.ts`. * * Idempotent by construction, because this is a command people re-run: a second * environment, a price change, an added plan, an unguarded CI step. The previous * implementation created unconditionally, so a second run left a duplicate * product behind and then failed on `prices.create` — a lookup key may only * belong to one active price — exiting non-zero having half-applied * (stacksjs/stacks#2359). * * Stripe prices are immutable, so a changed amount cannot be edited in place. * The lookup key is moved onto a new price with `transfer_lookup_key`, which * Stripe applies atomically, and the superseded price is left active but * unkeyed so existing subscriptions on it keep billing. */ export declare function createStripeProduct(options?: SetupProductsOptions): Promise>; /** Render a report as one line per action, for the CLI to print. */ export declare function formatSetupReport(report: SetupProductsReport): string[]; export declare interface SetupProductsOptions { dryRun?: boolean } /** One line of the plan of record, in the order it would be applied. */ export declare interface SetupProductAction { kind: 'product' | 'price' verb: 'create' | 'reuse' | 'replace' target: string detail?: string } export declare interface SetupProductsReport { dryRun: boolean actions: SetupProductAction[] }