MCPcopy Index your code
hub / github.com/simstudioai/sim / getDefaultBillingSummary

Function getDefaultBillingSummary

apps/sim/lib/billing/core/billing.ts:695–735  ·  view source on GitHub ↗

* Get default billing summary for error cases

(type: 'individual' | 'organization')

Source from the content-addressed store, hash-verified

693 * Get default billing summary for error cases
694 */
695function 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}

Callers 1

Calls 1

getFreeTierLimitFunction · 0.90

Tested by

no test coverage detected