We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1eacfcb commit a660907Copy full SHA for a660907
apps/sim/lib/billing/plans.ts
@@ -1,3 +1,4 @@
1
+import type Stripe from 'stripe'
2
import {
3
getFreeTierLimit,
4
getProTierLimit,
@@ -82,7 +83,7 @@ export interface StripePlanResolution {
82
83
* Used to get the authoritative plan from Stripe rather than relying on DB state.
84
*/
85
export function resolvePlanFromStripeSubscription(
- stripeSubscription: { items?: { data?: Array<{ price?: { id?: string } }> } } | null | undefined
86
+ stripeSubscription: Stripe.Subscription
87
): StripePlanResolution {
88
const priceId = stripeSubscription?.items?.data?.[0]?.price?.id
89
const plan = priceId ? getPlanByPriceId(priceId) : undefined
0 commit comments