mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-31 01:37:58 -05:00
fix typing
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type Stripe from 'stripe'
|
||||
import {
|
||||
getFreeTierLimit,
|
||||
getProTierLimit,
|
||||
@@ -82,7 +83,7 @@ export interface StripePlanResolution {
|
||||
* Used to get the authoritative plan from Stripe rather than relying on DB state.
|
||||
*/
|
||||
export function resolvePlanFromStripeSubscription(
|
||||
stripeSubscription: { items?: { data?: Array<{ price?: { id?: string } }> } } | null | undefined
|
||||
stripeSubscription: Stripe.Subscription
|
||||
): StripePlanResolution {
|
||||
const priceId = stripeSubscription?.items?.data?.[0]?.price?.id
|
||||
const plan = priceId ? getPlanByPriceId(priceId) : undefined
|
||||
|
||||
Reference in New Issue
Block a user