feat(billing): per-service and platform-wide free call limits
release / release (release) Canceled after 0s
release / release (release) Canceled after 0s
- mcp_service.free_daily_limit: per service, per user per day (NULL/0 = unlimited) - sys_config free_global_daily_limit: applies to every free service - effective limit = smaller of the two, so a service without its own value still inherits the global one - admin: Pricing tab input, System Settings > Business > Free Call Limits - submission review pages and endpoints (scaffolding, not yet published end to end) - allow LAN IPs in http_utils, add docker-compose.yml
This commit is contained in:
1 parent
2fd6272bbd
commit
d18adf035b
24 files changed
+720
-24
No files matched your search
@@ -26,6 +26,7 @@ import {
|
||||
Captions,
|
||||
Code,
|
||||
CreditCard,
|
||||
Gauge,
|
||||
GhostIcon,
|
||||
GlobeIcon,
|
||||
LockIcon,
|
||||
@@ -181,6 +182,12 @@ const SystemSettingsModal: React.FC<SystemSettingsModalProps> = ({
|
||||
icon: <CreditCard size={16} />,
|
||||
description: "Configure payment channels",
|
||||
},
|
||||
{
|
||||
key: SettingModalTab.FREE_QUOTA,
|
||||
label: "Free Call Limits",
|
||||
icon: <Gauge size={16} />,
|
||||
description: "Global daily call cap for free services",
|
||||
},
|
||||
{
|
||||
key: SettingModalTab.XPACK_EXPLORE,
|
||||
label: "XPack Explore",
|
||||
@@ -256,6 +263,7 @@ const SystemSettingsModal: React.FC<SystemSettingsModalProps> = ({
|
||||
title: "Business",
|
||||
items: groupItems([
|
||||
SettingModalTab.PAYMENT,
|
||||
SettingModalTab.FREE_QUOTA,
|
||||
SettingModalTab.XPACK_EXPLORE,
|
||||
]),
|
||||
},
|
||||
|
||||
@@ -31,6 +31,7 @@ import { AdminConfig, EmailConfig } from "@/types/system";
|
||||
import { LoginSettingsContent } from "./LoginSettingsContent";
|
||||
import { EmailConfigForm } from "@/components/system-setting/EmailConfigForm";
|
||||
import { LanguageSetting } from "@/components/system-setting/LanguageSetting";
|
||||
import { FreeQuotaSettings } from "@/components/system-setting/FreeQuotaSettings";
|
||||
import { TagsBarSetting } from "../system-setting/TagsBarSetting";
|
||||
|
||||
interface SystemSettingsRightContentProps {
|
||||
@@ -221,6 +222,8 @@ const SystemSettingsRightContent: React.FC<SystemSettingsRightContentProps> = ({
|
||||
<PaymentChannelsContent labelPlacement="outside" />
|
||||
)}
|
||||
|
||||
{section.key === "free-quota" && <FreeQuotaSettings />}
|
||||
|
||||
{section.key === "xpack-explore" && (
|
||||
<ExplorePanel
|
||||
isEnabled={!!platformConfig.is_showcased}
|
||||
|
||||
@@ -5,6 +5,7 @@ export enum SettingModalTab {
|
||||
BRANDING = "branding",
|
||||
THEME = "theme",
|
||||
PAYMENT = "payment",
|
||||
FREE_QUOTA = "free-quota",
|
||||
CODE_INJECTION = "code-injection",
|
||||
XPACK_EXPLORE = "xpack-explore",
|
||||
NAVIGATION = "navigation",
|
||||
|
||||
Reference in new issue
Block a user