-
-
- {t('Website Count')}
-
- {serviceCountData?.website ?? 0}
-
+
-
-
- {t('Monitor Count')}
-
- {serviceCountData?.monitor ?? 0}
-
+
-
-
- {t('Survey Count')}
-
- {serviceCountData?.survey ?? 0}
-
+
-
-
- {t('Page Count')}
-
- {serviceCountData?.page ?? 0}
-
+
-
-
- {t('Feed Channel Count')}
-
- {serviceCountData?.feed ?? 0}
-
+
-
-
- {t('Website Accepted Count')}
-
-
- {formatNumber(billingUsageData?.websiteAcceptedCount ?? 0)}
-
-
+
-
-
- {t('Website Event Count')}
-
-
- {formatNumber(billingUsageData?.websiteEventCount ?? 0)}
-
-
+
-
-
- {t('Monitor Execution Count')}
-
-
- {formatNumber(billingUsageData?.monitorExecutionCount ?? 0)}
-
-
+
-
-
- {t('Survey Count')}
-
-
- {formatNumber(billingUsageData?.surveyCount ?? 0)}
-
-
+
-
-
- {t('Feed Event Count')}
-
-
- {formatNumber(billingUsageData?.feedEventCount ?? 0)}
-
-
+
diff --git a/src/server/model/billing/limit.ts b/src/server/model/billing/limit.ts
index eccc348..0136a5f 100644
--- a/src/server/model/billing/limit.ts
+++ b/src/server/model/billing/limit.ts
@@ -1,13 +1,16 @@
import { WorkspaceSubscriptionTier } from '@prisma/client';
+import { z } from 'zod';
-interface TierLimit {
- maxWebsiteCount: number;
- maxWebsiteEventCount: number;
- maxMonitorExecutionCount: number;
- maxSurveyCount: number;
- maxFeedChannelCount: number;
- maxFeedEventCount: number;
-}
+export const TierLimitSchema = z.object({
+ maxWebsiteCount: z.number(),
+ maxWebsiteEventCount: z.number(),
+ maxMonitorExecutionCount: z.number(),
+ maxSurveyCount: z.number(),
+ maxFeedChannelCount: z.number(),
+ maxFeedEventCount: z.number(),
+});
+
+type TierLimit = z.infer