import { PaidWorkspacePlans, WorkspacePlanBillingIntervals, WorkspacePlans } from '@speckle/shared' import { OverrideProperties, SetOptional } from 'type-fest' /** * This includes the pricing plans (Stripe products) a customer can sub to */ export type WorkspacePricingProducts = PaidWorkspacePlans | 'guest' type WorkspacePlanProductsMetadata = OverrideProperties< Record< WorkspacePricingProducts, Record & { productId: string } >, { // Team has no yearly plan [PaidWorkspacePlans.Team]: { productId: string monthly: PriceData } } > export type WorkspacePlanProductAndPriceIds = SetOptional< WorkspacePlanProductsMetadata, typeof WorkspacePlans.Team | typeof WorkspacePlans.Pro > export type WorkspacePlanProductPrices = SetOptional< WorkspacePlanProductsMetadata<{ amount: number currency: string }>, typeof WorkspacePlans.Team | typeof WorkspacePlans.Pro >