2.2 KiB
2.2 KiB
migration-interface
Goal
Design a shared billing-action interface for customer migrations and imports so scripts stop hand-rolling Stripe + Autumn DB orchestration. Eventually exposed to users on the dashboard, so it must be a first-class product feature with tests — not an internal tool.
Current Phase
Phase 1: Discovery complete (catalog written). PROPOSAL.md v2 drafted — planner + executor model with typed operations. Awaiting user review of architecture and 8 open design questions.
Branch
john/migration-interface
Active Tasks
- (none yet — will create parallel cataloging tasks if Phase 1 surface gets large)
What's Done
- Phase 1 discovery: cataloged
scripts/src/common/migrations/(23 files),scripts-v2/runs/migration scripts, mintlify+firecrawl import chains, and billing v2 action machinery (multiAttach,createSchedule,updateSubscription,evaluateStripeBillingPlan,AutumnBillingPlan,customizePlanV1,setupCustomFullProduct). - See
CATALOG.mdfor full pattern inventory andPROPOSAL.mdfor the layered-interface design.
What's Next
- Walk through
PROPOSAL.mdwith user — confirm 3-layer model and discuss the 7 open design questions - Read existing
actions/migrate/migrate.tsto decide extend-vs-replace - Lock Layer 3 scope (include
patchop? or split intomigrate+ extendedupdateSubscription?) - Begin Phase 2: design
MigrateParams,MigrateBillingContext,computeMigratePlansignatures concretely
Active Blockers
- None
Key Files
server/src/internal/billing/v2/actions/index.ts— where new action(s) will registerserver/src/internal/billing/v2/actions/multiAttach/multiAttach.ts— closest existing analogserver/src/internal/billing/v2/actions/createSchedule/createSchedule.ts— schedule pattern referenceserver/src/internal/billing/v2/actions/updateSubscription/updateSubscription.ts— single-subscription mutation referenceserver/src/internal/billing/v2/providers/stripe/actionBuilders/evaluateStripeBillingPlan.ts— Autumn plan → Stripe state mappershared/api/billing/common/customizePlan/customizePlanV1.ts— public customize schemashared/api/products/items/apiPlanItemV1.ts— public plan item shape