Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import { SubscriptionBillingPeriod } from "~/application/enums/subscriptions/SubscriptionBillingPeriod";
|
||||
|
||||
export interface BillingPeriodDto {
|
||||
value: SubscriptionBillingPeriod;
|
||||
default?: boolean;
|
||||
disabled?: boolean;
|
||||
recurring: boolean;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
export interface CurrencyDto {
|
||||
name: string;
|
||||
value: string;
|
||||
symbol: string;
|
||||
default?: boolean;
|
||||
disabled?: boolean;
|
||||
parities?: { from: string; parity: number }[];
|
||||
symbolRight?: boolean;
|
||||
thousandSeparator?: string;
|
||||
decimalSeparator?: string;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export interface FlatPriceDto {
|
||||
currency: string;
|
||||
monthlyPrice?: number;
|
||||
yearlyPrice?: number;
|
||||
oneTimePrice?: number;
|
||||
quarterlyPrice?: number;
|
||||
semiAnnualPrice?: number;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { SubscriptionFeatureLimitType } from "~/application/enums/subscriptions/SubscriptionFeatureLimitType";
|
||||
|
||||
export interface PlanFeatureUsageDto {
|
||||
order: number;
|
||||
title: string;
|
||||
name: string;
|
||||
type: SubscriptionFeatureLimitType;
|
||||
value: number;
|
||||
used: number;
|
||||
remaining: number | "unlimited";
|
||||
enabled: boolean;
|
||||
message: string;
|
||||
entity?: { id: string; title: string; titlePlural: string; slug: string };
|
||||
period?: {
|
||||
firstDay: Date | null;
|
||||
lastDay: Date | null;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { SubscriptionFeatureLimitType } from "~/application/enums/subscriptions/SubscriptionFeatureLimitType";
|
||||
|
||||
export interface SubscriptionFeatureDto {
|
||||
order: number;
|
||||
title: string;
|
||||
name: string;
|
||||
type: SubscriptionFeatureLimitType;
|
||||
value: number;
|
||||
href?: string | null;
|
||||
badge?: string | null;
|
||||
accumulate?: boolean;
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { SubscriptionFeatureLimitType } from "~/application/enums/subscriptions/SubscriptionFeatureLimitType";
|
||||
|
||||
export interface SubscriptionFeatureInPlansDto {
|
||||
id: string;
|
||||
order: number;
|
||||
name: string;
|
||||
href?: string | null;
|
||||
badge?: string | null;
|
||||
accumulate?: boolean;
|
||||
plans: {
|
||||
id: string;
|
||||
title: string;
|
||||
type: SubscriptionFeatureLimitType;
|
||||
value: number;
|
||||
}[];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { SubscriptionProductDto } from "./SubscriptionProductDto";
|
||||
import { SubscriptionPriceType } from "~/application/enums/subscriptions/SubscriptionPriceType";
|
||||
import { SubscriptionBillingPeriod } from "~/application/enums/subscriptions/SubscriptionBillingPeriod";
|
||||
import { SubscriptionUsageBasedTier } from "@toolctrl/db/prisma-browser";
|
||||
import { Decimal } from "decimal.js";
|
||||
|
||||
export interface SubscriptionPriceDto {
|
||||
id?: string;
|
||||
stripeId: string;
|
||||
type: SubscriptionPriceType;
|
||||
billingPeriod: SubscriptionBillingPeriod;
|
||||
price: number | Decimal;
|
||||
currency: string;
|
||||
trialDays: number;
|
||||
active: boolean;
|
||||
priceBefore?: number;
|
||||
subscriptionProductId: string;
|
||||
subscriptionProduct?: SubscriptionProductDto;
|
||||
usageBasedPrices?: SubscriptionUsageBasedTier[];
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { SubscriptionPriceDto } from "./SubscriptionPriceDto";
|
||||
import { SubscriptionFeatureDto } from "./SubscriptionFeatureDto";
|
||||
import { PricingModel } from "~/application/enums/subscriptions/PricingModel";
|
||||
import { SubscriptionUsageBasedPriceDto } from "./SubscriptionUsageBasedPriceDto";
|
||||
import { TenantSubscriptionProduct, TenantType } from "@toolctrl/db/prisma-browser";
|
||||
|
||||
export interface SubscriptionProductDto {
|
||||
id?: string;
|
||||
stripeId: string;
|
||||
order: number;
|
||||
title: string;
|
||||
description: string | null;
|
||||
groupTitle?: string | null;
|
||||
groupDescription?: string | null;
|
||||
badge: string | null;
|
||||
active: boolean;
|
||||
model: PricingModel;
|
||||
public: boolean;
|
||||
prices: SubscriptionPriceDto[];
|
||||
features: SubscriptionFeatureDto[];
|
||||
translatedTitle?: string;
|
||||
usageBasedPrices?: SubscriptionUsageBasedPriceDto[];
|
||||
tenantProducts?: TenantSubscriptionProduct[];
|
||||
assignsTenantTypes?: TenantType[];
|
||||
billingAddressCollection?: string | null;
|
||||
hasQuantity?: boolean;
|
||||
canBuyAgain?: boolean;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { SubscriptionBillingPeriod } from "~/application/enums/subscriptions/SubscriptionBillingPeriod";
|
||||
import { SubscriptionUsageBasedTierDto } from "./SubscriptionUsageBasedTierDto";
|
||||
|
||||
export interface SubscriptionUsageBasedPriceDto {
|
||||
id: string;
|
||||
subscriptionProductId: string;
|
||||
stripeId: string;
|
||||
billingPeriod: SubscriptionBillingPeriod;
|
||||
currency: string;
|
||||
unit: string;
|
||||
unitTitle: string;
|
||||
unitTitlePlural: string;
|
||||
usageType: string;
|
||||
aggregateUsage: string;
|
||||
tiersMode: string;
|
||||
billingScheme: string;
|
||||
tiers: SubscriptionUsageBasedTierDto[];
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { Decimal } from "decimal.js";
|
||||
|
||||
export interface SubscriptionUsageBasedTierDto {
|
||||
id: string;
|
||||
subscriptionUsageBasedPriceId: string;
|
||||
from: number;
|
||||
to?: number | null;
|
||||
perUnitPrice?: number | Decimal | null;
|
||||
flatFeePrice?: number | Decimal | null;
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
export type SubscriptionUsageBasedUnitDto = {
|
||||
unit: string;
|
||||
unitTitle: string;
|
||||
unitTitlePlural: string;
|
||||
usageType: string;
|
||||
aggregateUsage: string;
|
||||
tiersMode: string;
|
||||
billingScheme: string;
|
||||
tiers: { from: number; to?: number }[];
|
||||
prices: {
|
||||
currency: string;
|
||||
from: number;
|
||||
to: number | undefined;
|
||||
perUnitPrice?: number | undefined;
|
||||
flatFeePrice?: number | undefined;
|
||||
}[];
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface UsageBasedPriceDto {
|
||||
from: number;
|
||||
to?: number | undefined;
|
||||
perUnitPrice?: number | undefined;
|
||||
flatFeePrice?: number | undefined;
|
||||
currency: string;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export type UsageBasedUnitDto = {
|
||||
name: string;
|
||||
title: string;
|
||||
titlePlural: string;
|
||||
};
|
||||
Reference in new issue
Block a user