* Get default billing summary for error cases
(type: 'individual' | 'organization')
| 693 | * Get default billing summary for error cases |
| 694 | */ |
| 695 | function getDefaultBillingSummary(type: 'individual' | 'organization') { |
| 696 | const freeTierLimit = getFreeTierLimit() |
| 697 | return { |
| 698 | type, |
| 699 | plan: 'free', |
| 700 | currentUsage: 0, |
| 701 | usageLimit: freeTierLimit, |
| 702 | percentUsed: 0, |
| 703 | isWarning: false, |
| 704 | isExceeded: false, |
| 705 | daysRemaining: 0, |
| 706 | creditBalance: 0, |
| 707 | billingInterval: 'month' as const, |
| 708 | // Subscription details |
| 709 | isPaid: false, |
| 710 | isPro: false, |
| 711 | isTeam: false, |
| 712 | isEnterprise: false, |
| 713 | isOrgScoped: false, |
| 714 | organizationId: null, |
| 715 | status: null, |
| 716 | seats: null, |
| 717 | metadata: null, |
| 718 | stripeSubscriptionId: null, |
| 719 | periodEnd: null, |
| 720 | // Usage details |
| 721 | usage: { |
| 722 | current: 0, |
| 723 | limit: freeTierLimit, |
| 724 | percentUsed: 0, |
| 725 | isWarning: false, |
| 726 | isExceeded: false, |
| 727 | billingPeriodStart: null, |
| 728 | billingPeriodEnd: null, |
| 729 | lastPeriodCost: 0, |
| 730 | lastPeriodCopilotCost: 0, |
| 731 | daysRemaining: 0, |
| 732 | copilotCost: 0, |
| 733 | }, |
| 734 | } |
| 735 | } |
no test coverage detected