61ca128ce2
* feat(gatekeeper): support multiple currencies * feat(helm): add new currency based prices to helm chart * chore(env): add example currency based pricing values * fix(ci): update price ids to the proper values * feat(helm): rename price ids to fit multi currency * feat(gatekeeper): currency input for checkout session * Updated prices in the FE * chore(gatekeeper): remove old checkout session flow * Updated prices in the FE * Fix FE * Fix pipeline --------- Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import {
|
|
PaidWorkspacePlansOld,
|
|
PaidWorkspacePlansNew,
|
|
WorkspacePlanBillingIntervals
|
|
} from '@speckle/shared'
|
|
|
|
/**
|
|
* This includes the pricing plans (Stripe products) a customer can sub to
|
|
// */
|
|
export type WorkspacePricingProducts =
|
|
| PaidWorkspacePlansNew
|
|
| PaidWorkspacePlansOld
|
|
| 'guest'
|
|
|
|
// type WorkspacePlanProductsMetadata<PriceData = string> = Record<
|
|
// WorkspacePricingProducts,
|
|
// Record<WorkspacePlanBillingIntervals, PriceData> & {
|
|
// productId: string
|
|
// }
|
|
// >
|
|
|
|
export const Currency = {
|
|
usd: 'usd',
|
|
gbp: 'gbp'
|
|
} as const
|
|
|
|
type IntervalPrices = Record<
|
|
WorkspacePlanBillingIntervals,
|
|
{ amount: number; currency: string }
|
|
>
|
|
|
|
export type WorkspacePlanProductPrices = Record<
|
|
Currency,
|
|
Record<PaidWorkspacePlansNew, IntervalPrices>
|
|
>
|
|
|
|
export type Currency = (typeof Currency)[keyof typeof Currency]
|
|
|
|
// export type WorkspacePlanProductAndPriceIds = WorkspacePlanProductsMetadata<string>
|
|
// export type WorkspacePlanProductPrices = WorkspacePlanProductsMetadata<{
|
|
// amount: number
|
|
// currency: string
|
|
// }>
|