chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -16,8 +16,8 @@
export { useFetchKnowledgeBenefit } from './use-fetch-knowledge-benefit';
export enum PremiumPaywallBannerScene {
Knowledge, // 知识库场景
Token, // 其余 Token 消耗场景
Knowledge, // Knowledge base scenario
Token, // Token consumption scenarios
}
export function PremiumPaywallBanner(_props: {

View File

@@ -15,27 +15,27 @@
*/
export enum PremiumPaywallScene {
// 创建新空间
// Create a new space
AddSpace,
// 新模型体验
// New model experience
NewModel,
// 付费用户模板
// paid user template
ProTemplate,
// 添加空间成员
// Add space member
AddSpaceMember,
// 协作
// collaboration
Collaborate,
// 跨空间资源复制
// Cross-spatial resource replication
CopyResourceCrossSpace,
// 发布到API或者SDK
// Publish to API or SDK
API,
// 添加音色资源
// Add Timbre Resources
AddVoice,
// 实时语音对话
// real-time voice conversation
RTC,
// 导出日志
// export log
ExportLog,
// 查询日志
// query log
FilterLog,
}
export function useBenefitAvailable(_props: unknown) {

View File

@@ -17,17 +17,17 @@
import { UserLevel, type MemberVersionRights } from '../types';
interface UseBenefitBasicResult {
name: string; // 当前用户套餐名称
level: UserLevel; // 当前工作空间:用户的套餐级别
compareLevel: UserLevel; // 当前工作空间:如果是专业版,值是 UserLevel.ProPersonal,其他场景同 level
currPlan: MemberVersionRights; // 当前套餐信息
nextPlan: MemberVersionRights; // 下一个套餐信息。如果当前已经是最高套餐级别,则值为最高级别套餐
accountPlan: MemberVersionRights; // 账号维度的套餐信息
instanceStatus: unknown; // 当前套餐状态,可以用来判断退订/到期状态
isOverdue: boolean; // 是否欠费
isExpired: boolean; // 是否过期
isTerminated: boolean; // 是否退订
maxMember: number; //成员上限
name: string; // Current user package name
level: UserLevel; // Current Workspace: User's plan level
compareLevel: UserLevel; // Current workspace: If it is a professional version, the value is UserLevel. ProPersonal, and other scenes are at the same level.
currPlan: MemberVersionRights; // Current package information
nextPlan: MemberVersionRights; // Next package information. If it is already the highest package level, the value is the highest package level.
accountPlan: MemberVersionRights; // Package information in the account dimension
instanceStatus: unknown; // The current package status can be used to determine the unsubscribe/expiration status.
isOverdue: boolean; // Is it in arrears?
isExpired: boolean; // Whether it has expired
isTerminated: boolean; // Whether to unsubscribe
maxMember: number; //maximum membership
}
const defaultData = {
@@ -44,7 +44,7 @@ const defaultData = {
maxMember: -1,
};
/**
* 获取国内权益基础信息
* Acquire basic information on domestic rights and interests
*/
export function useBenefitBasic(): UseBenefitBasicResult {
return defaultData;

View File

@@ -15,11 +15,11 @@
*/
const quota = {
/** 当前消耗的额度,对应到套餐内每天刷新的 */
/** The current consumption amount corresponds to the daily refresh in the package. */
remain: 0,
total: 0,
used: 0,
/** 额外购买的额度,目前只处理国内 */
/** The additional purchase amount is currently only processed in China. */
extraRemain: 0,
extraTotal: 0,
extraUsed: 0,

View File

@@ -27,7 +27,7 @@ import {
type MemberVersionRights,
} from '../types';
// 只处理最低和最高订阅服务档位
// Only handle the lowest and highest subscription service gears
export enum PremiumPlanLevel {
Free = 0,
@@ -47,31 +47,31 @@ export interface VolcanoInfo {
}
interface PremiumStoreState {
polling: boolean; // 是否开启订阅数据自动轮询
plans: PremiumPlan[]; // 付费订阅计划列表
subs: PremiumSubs; // 所有订阅数据
currentPlan: SubscriptionDetail; // 当前订阅详情
polling: boolean; // Whether to enable automatic polling of subscription data
plans: PremiumPlan[]; // List of paid subscription plans
subs: PremiumSubs; // All subscription data
currentPlan: SubscriptionDetail; // Current subscription details
hasTrial: boolean;
connections: BindConnection[]; // 第三方账号连接数据
benefit: SubscriptionDetailV2; // 用户权益数据
plansCN: Array<MemberVersionRights>; // 国内订阅套餐列表
volcanoInfo: VolcanoInfo; // oauth跳转到火山需要用到的参数
connections: BindConnection[]; // third-party account connection data
benefit: SubscriptionDetailV2; // user rights data
plansCN: Array<MemberVersionRights>; // List of domestic subscription packages
volcanoInfo: VolcanoInfo; // Oauth jump to the volcano required parameters
}
interface PremiumStoreAction {
/**
* 重置状态
* reset state
*/
reset: () => void;
/**
* 设置是否轮询获取订阅数据,以下场景需要:
* - Bot详情判断是否需要显示订阅卡片
* - 左侧菜单栏判断是否需要显示'coze premium'
* - 左侧菜单栏展示credits数量信息
* To set whether to poll for subscription data, the following scenarios are required:
* - Bot details to determine whether the subscription card needs to be displayed
* - The left menu bar determines whether to display'coze premium'
* - The left menu bar displays the number of credits
*/
setPolling: (polling: boolean) => void;
/**
* 获取海外订阅套餐列表
* Get a list of overseas subscription packages
*/
fetchPremiumPlans: () => Promise<{
plans: PremiumPlan[];
@@ -79,35 +79,35 @@ interface PremiumStoreAction {
hasTrial: boolean;
}>;
/**
* 设置国内套餐列表
* Set up a list of domestic packages
*/
setPremiumPlansCN: (plans: Array<MemberVersionRights>) => void;
/**
* 恢复订阅,暂时只有海外
* Resume subscription, only overseas for the time being
*/
renewCurrentPlan: (plan: SubscriptionDetail) => void;
/**
* 获取当前用户订阅详情,暂时只有海外
* Get the current user subscription details, only overseas for the time being
*/
fetchPremiumPlan: () => Promise<SubscriptionDetail>;
/**
* 取消订阅,暂时只有海外
* Cancel the subscription, only overseas for the time being.
*/
cancelCurrentPlan: () => void;
/**
* 获取渠道绑定信息,暂时只有海外
* Get channel binding information, only overseas for the time being.
*/
fetchConnections: () => Promise<void>;
/**
* 取消渠道用户绑定,暂时只有海外
* Cancel the channel user binding, only overseas for the time being
*/
disconnectUser: (connectorId: string) => void;
/**
* 设置当前登录用户权益信息,海内外通用
* Set the current logged in user rights and interests information, common at home and abroad
*/
setUserBenefit: (benefit: unknown) => void;
/**
* 设置当前账号相关火山信息
* Set the current account related volcano information
*/
setVolcanoInfo: (info: VolcanoInfo) => void;
}

View File

@@ -26,22 +26,22 @@ import {
import { type BindConnection } from '@coze-arch/bot-api/developer_api';
export enum UserLevel {
/** 免费版。 */
/** The free version. */
Free = 0,
/** 海外
/** overseas
PremiumLite */
PremiumLite = 10,
/** Premium */
Premium = 15,
PremiumPlus = 20,
/** 国内
V1火山专业版 */
/** domestic
V1 Volcano Pro */
V1ProInstance = 100,
/** 个人旗舰版 */
/** Personal flagship version */
ProPersonal = 110,
/** 团队版 */
/** Team Edition */
Team = 120,
/** 企业版 */
/** Enterprise Edition */
Enterprise = 130,
}