hts/apps/staffai/lib/http/staff/data.d.ts

258 lines
6.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export interface UserListItem {
staff_id: number;
user_name: string;
user_alias: string;
deptId: number;
}
export interface DocsListItem {
id: number; //文档ID
file_name: string; //原始文件名
file_path: string; //文件存储相对路径
file_url: string; //文件访问URL
file_size: number; //文件大小(字节)
created_time: string;
updated_time: string;
}
export interface UserInfo {
user_name: string;
user_alias: string;
phone_number: string;
password: string;
remark: string;
role_name: string;
}
export interface PayInfo {
id: number;
production_id: number; //支付套餐ID
pay_type: string; //支付方式(wxpay=微信支付 alipay=支付宝 stripe=Stripe支付)
}
export interface UserListPagination {
total: number;
pageSize: number;
current: number;
}
export interface UserListData {
list: UserListItem[];
pagination: Partial<UserListPagination>;
}
export interface UserListParams {
user_id?: number;
user_name?: string;
status?: number;
pageSize?: number;
current?: number;
currentPage?: number;
filter?: { [key: string]: any[] };
sorter?: { [key: string]: any };
}
export interface UserListParamsV2 {
// user_name?: string;
// page_no?: number;
// page_size?: number;
user_name?: string;
status?: number;
pageSize?: number;
current?: number;
currentPage?: number;
}
export interface DocsListParams {
// user_name?: string;
// page_no?: number;
// page_size?: number;
id?: string; //员工ID
pageSize?: number;
current?: number;
currentPage?: number;
}
export interface BillingListParams {
id?: number;
pageSize?: number;
current?: number;
currentPage?: number;
}
export interface RoleList {
id: number;
create_user: string;
created_time: string;
remark: string;
is_inherent: boolean;
role: string[];
role_alias: string;
role_name: string;
}
export interface JobList {
id: number;
jobName: string;
}
export interface SelectData {
roleList: RoleList[];
jobList: JobList[];
}
export enum StaffState {
Inactive = 0, //0=未激活
Active = 1, // 1=正常
ApproachingExpiration = 2, // 2=接近过期
Expired = 3, //已过期
// toString(): string {
// switch (this) {
// case StaffState.Inactive:
// return "未激活";
// case StaffState.Active:
// return "正常";
// case StaffState.ApproachingExpiration:
// return "接近过期";
// case StaffState.Expired:
// return "已过期";
// default:
// return "未知状态";
// }
// }
}
export interface StaffQuery {
id?: number; // 按员工ID查询
name?: string; // 按员工名称查询
serial_no?: string; // 按员工序列号查询
page_no?: number; // 当前页码
page_size?: number; // 每页显示条目数
}
export interface StaffsInfo {
serial_no?: string;
customer_id?: number;
name: string; //员工名称(必填)
org_name: string; //组织名称(必填)
tone?: string; //语气friendly and sincere友好且真诚, professional and cautious专业且稳重, clear and direct清晰且直接
output_length?: string; //回复长度detailed详细, normal-length正常长度, concise简洁
description?: string; // 可能为 null //员工描述
trial_time?: string;
expiring_time?: string;
language_mode?: string; // 语言模式written书面spoken口语
language_response?: string; // 回复语言Chinese、English
state?: StaffState; // 你需要根据 models.StaffState 的定义来确定类型 //状态(0=未激活 1=正常 2=接近过期 3=已过期)
edit_user?: string;
is_frozen?: boolean; // 是否已冻结
api_key?: string;
secret_key?: string;
chat_url?: string; //智能员工URL
avatar_url?: string; //智能员工头像
repo_name?: string; //知识库名称
repo_descr?: string; //知识库描述
greetings?: string; //问候语
created_time?: string;
updated_time?: string;
}
export interface StaffsInfoWithoutId extends StaffsInfo {
id: number;
}
// export interface PaymentInfo {
// pay_type: string;
// pay_url: string;
// trade_no: string;
// }
export interface PaymentOrder {
state: number; //订单状态(0=待支付 1=处理中 2=已成功支付 3=已取消 4=已退款 5=支付平台异常)
message: string; //订单交易状态信息
}
export interface DocumentInfo {
name?: string; // 文件名
file_name: string; // 原始文件名
file_path: string; // 文件存储相对路径
file_size: number; // 文件大小(字节)
file_url: string; // 文件访问URL
description: string; // 文档描述
created_time?: string; // 创建时间
updated_time?: string; // 更新时间
}
export interface DocumentWithoutId extends DocumentInfo {
id: number; // 文档ID
}
// export interface StaffsInfo {
// id?: number;
// serial_no?: string;
// customer_id?: number;
// name: string;
// org_name: string;
// tone?: string;
// output_length?: string;
// description?: string | null; // 可能为 null
// trial_time?: string;
// expiring_time?: string;
// state?: StaffState; // 你需要根据 models.StaffState 的定义来确定类型
// edit_user?: string;
// is_frozen?: boolean;
// chat_url?: string;
// avatar_url?: string;
// created_time?: string;
// updated_time?: string;
// }
export interface PaymentInfo {
id: number; // 自增ID
customer_id: number; // 客户ID
staff_id: number; // 员工ID
pay_type: 'wxpay' | 'alipay' | 'stripe'; // 支付方式(wxpay=微信 alipay=支付宝 stripe=Stripe支付)
trade_no: string; // 商家交易订单号(商家系统唯一ID)
transaction_id: string; // 支付平台唯一交易ID
customer_email: string; // 客户邮箱地址(Stripe支付必填)
prod_id: number; // 产品ID
prod_no: string; // 产品序列号
prod_name: string; // 产品名称
prod_price: string; // 产品价格
currency: string; // 单位(CNY/USD...)
pay_amount: string; // 支付金额(单位: 元)
refund_amount: string; // 退款金额(单位: 元)
state: 0 | 1 | 2 | 3 | 4 | 5; // 支付状态(0=等待付款 1=已完成付款 2=付款超时关闭 3=已退款 4=已结束[不可退款] 5=支付平台异常)
created_time: string; // 创建时间
updated_time: string; // 更新时间
pay_url: string; // 支付链接
extra_data: any; // 附带数据(JSON)
message: string; // 支付交易信息
payer: string; // 支付人信息
}