2024-02-17 12:42:00 +11:00
|
|
|
import { STRIPE_PLAN_TYPE } from '@documenso/lib/constants/billing';
|
|
|
|
|
|
|
|
|
|
import { getPricesByPlan } from './get-prices-by-plan';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the Stripe prices of items that affect the amount of teams a user can create.
|
|
|
|
|
*/
|
|
|
|
|
export const getTeamRelatedPrices = async () => {
|
2024-11-25 15:47:00 +11:00
|
|
|
return await getPricesByPlan([
|
|
|
|
|
STRIPE_PLAN_TYPE.COMMUNITY,
|
|
|
|
|
STRIPE_PLAN_TYPE.PLATFORM,
|
|
|
|
|
STRIPE_PLAN_TYPE.ENTERPRISE,
|
|
|
|
|
]);
|
2024-02-17 12:42:00 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the Stripe price IDs of items that affect the amount of teams a user can create.
|
|
|
|
|
*/
|
|
|
|
|
export const getTeamRelatedPriceIds = async () => {
|
|
|
|
|
return await getTeamRelatedPrices().then((prices) => prices.map((price) => price.id));
|
|
|
|
|
};
|