2026-04-23 09:05:55 +08:00
|
|
|
|
declare namespace Api {
|
|
|
|
|
|
/**
|
|
|
|
|
|
* namespace Product
|
|
|
|
|
|
*
|
|
|
|
|
|
* backend api module: "project/product"
|
|
|
|
|
|
*/
|
|
|
|
|
|
namespace Product {
|
|
|
|
|
|
type ProductStatusCode = 'active' | 'paused' | 'archived' | 'abandoned';
|
|
|
|
|
|
|
|
|
|
|
|
type ProductStatusActionCode = 'pause' | 'resume' | 'archive' | 'abandon';
|
|
|
|
|
|
|
|
|
|
|
|
type ProductMemberStatus = 0 | 1;
|
|
|
|
|
|
|
|
|
|
|
|
interface PageParams {
|
|
|
|
|
|
pageNo: number;
|
|
|
|
|
|
pageSize: number;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface PageResult<T = any> {
|
|
|
|
|
|
total: number;
|
|
|
|
|
|
list: T[];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface Product {
|
|
|
|
|
|
/** 产品 ID */
|
|
|
|
|
|
id: string;
|
|
|
|
|
|
/** 产品编码 */
|
|
|
|
|
|
code: string;
|
|
|
|
|
|
/** 产品方向字典值 */
|
|
|
|
|
|
directionCode: string;
|
|
|
|
|
|
/** 产品名称 */
|
|
|
|
|
|
name: string;
|
|
|
|
|
|
/** 产品经理用户 ID */
|
|
|
|
|
|
managerUserId: string;
|
|
|
|
|
|
/** 产品描述 */
|
|
|
|
|
|
description?: string | null;
|
|
|
|
|
|
/** 产品状态编码 */
|
|
|
|
|
|
statusCode: ProductStatusCode;
|
|
|
|
|
|
/** 最近一次状态动作原因 */
|
|
|
|
|
|
lastStatusReason?: string | null;
|
|
|
|
|
|
/** 备注 */
|
|
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
/** 创建时间 */
|
|
|
|
|
|
createTime: string;
|
|
|
|
|
|
/** 更新时间 */
|
|
|
|
|
|
updateTime: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface ProductSettingBaseInfo {
|
|
|
|
|
|
/** 产品 ID */
|
|
|
|
|
|
id: string;
|
|
|
|
|
|
/** 产品编码 */
|
|
|
|
|
|
code: string;
|
|
|
|
|
|
/** 产品方向字典值 */
|
|
|
|
|
|
directionCode: string;
|
|
|
|
|
|
/** 产品名称 */
|
|
|
|
|
|
name: string;
|
|
|
|
|
|
/** 产品经理用户 ID */
|
|
|
|
|
|
managerUserId: string;
|
|
|
|
|
|
/** 产品经理昵称 */
|
|
|
|
|
|
managerUserNickname: string;
|
|
|
|
|
|
/** 产品描述 */
|
|
|
|
|
|
description?: string | null;
|
|
|
|
|
|
/** 当前产品状态 */
|
|
|
|
|
|
statusCode: ProductStatusCode;
|
|
|
|
|
|
/** 最近一次状态动作原因 */
|
|
|
|
|
|
lastStatusReason?: string | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface ProductLifecycleAction {
|
|
|
|
|
|
actionCode: ProductStatusActionCode;
|
|
|
|
|
|
actionName: string;
|
|
|
|
|
|
needReason: boolean;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface ProductLifecycleInfo {
|
|
|
|
|
|
statusCode: ProductStatusCode;
|
|
|
|
|
|
lastStatusReason?: string | null;
|
|
|
|
|
|
availableActions: ProductLifecycleAction[];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface ProductSettings {
|
|
|
|
|
|
baseInfo: ProductSettingBaseInfo;
|
|
|
|
|
|
lifecycle: ProductLifecycleInfo;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface ProductMember {
|
|
|
|
|
|
/** 团队关系 ID */
|
|
|
|
|
|
id: string;
|
|
|
|
|
|
/** 用户 ID */
|
|
|
|
|
|
userId: string;
|
|
|
|
|
|
/** 用户昵称 */
|
|
|
|
|
|
userNickname: string;
|
|
|
|
|
|
/** 角色 ID */
|
|
|
|
|
|
roleId: string;
|
|
|
|
|
|
/** 角色名称 */
|
|
|
|
|
|
roleName: string;
|
|
|
|
|
|
/** 角色编码 */
|
|
|
|
|
|
roleCode: string;
|
|
|
|
|
|
/** 是否当前产品经理 */
|
|
|
|
|
|
managerFlag: boolean;
|
|
|
|
|
|
/** 成员状态 */
|
|
|
|
|
|
status: ProductMemberStatus;
|
|
|
|
|
|
/** 加入时间 */
|
|
|
|
|
|
joinedTime: string;
|
|
|
|
|
|
/** 退出时间 */
|
|
|
|
|
|
leftTime?: string | null;
|
|
|
|
|
|
/** 备注 */
|
|
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-24 16:38:43 +08:00
|
|
|
|
type ProductActivityType = 'status' | 'product' | 'member';
|
|
|
|
|
|
|
|
|
|
|
|
type ProductActivityActionType =
|
|
|
|
|
|
| 'create'
|
|
|
|
|
|
| 'change_manager'
|
|
|
|
|
|
| 'pause'
|
|
|
|
|
|
| 'resume'
|
|
|
|
|
|
| 'archive'
|
|
|
|
|
|
| 'abandon'
|
|
|
|
|
|
| 'add_member'
|
|
|
|
|
|
| 'update_member'
|
|
|
|
|
|
| 'remove_member';
|
|
|
|
|
|
|
|
|
|
|
|
interface ProductActivityTimelinePageParams extends PageParams {
|
|
|
|
|
|
/** 分类 */
|
|
|
|
|
|
activityType?: ProductActivityType | null;
|
|
|
|
|
|
/** 动作编码数组,多选时按重复 query 参数传递 */
|
|
|
|
|
|
actionTypes?: ProductActivityActionType[] | null;
|
|
|
|
|
|
/** 开始时间,格式 yyyy-MM-dd HH:mm:ss */
|
|
|
|
|
|
startTime?: string | null;
|
|
|
|
|
|
/** 结束时间,格式 yyyy-MM-dd HH:mm:ss */
|
|
|
|
|
|
endTime?: string | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface ProductActivityTimelineItem {
|
|
|
|
|
|
/** 动态唯一标识 */
|
|
|
|
|
|
id: string;
|
|
|
|
|
|
/** 动态类型 */
|
|
|
|
|
|
type: ProductActivityType;
|
|
|
|
|
|
/** 动作编码 */
|
|
|
|
|
|
actionType: ProductActivityActionType;
|
|
|
|
|
|
/** 动作中文名称 */
|
|
|
|
|
|
actionName: string;
|
|
|
|
|
|
/** 操作人用户 ID */
|
|
|
|
|
|
operatorUserId?: string | null;
|
|
|
|
|
|
/** 操作人名称 */
|
|
|
|
|
|
operatorName: string;
|
|
|
|
|
|
/** 目标用户 ID,成员类动态使用 */
|
|
|
|
|
|
targetUserId?: string | null;
|
|
|
|
|
|
/** 目标用户名称,成员类动态使用 */
|
|
|
|
|
|
targetUserName?: string | null;
|
|
|
|
|
|
/** 动态发生时间,毫秒时间戳 */
|
|
|
|
|
|
occurredAt: number;
|
|
|
|
|
|
/** 可直接展示的摘要文案 */
|
|
|
|
|
|
summary: string;
|
|
|
|
|
|
/** 原因说明 */
|
|
|
|
|
|
reason?: string | null;
|
|
|
|
|
|
/** 原状态编码 */
|
|
|
|
|
|
fromStatus?: ProductStatusCode | null;
|
|
|
|
|
|
/** 目标状态编码 */
|
|
|
|
|
|
toStatus?: ProductStatusCode | null;
|
|
|
|
|
|
/** 补充明细,当前为 JSON 字符串 */
|
|
|
|
|
|
details?: string | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-23 09:05:55 +08:00
|
|
|
|
type ProductSearchParams = CommonType.RecordNullable<
|
|
|
|
|
|
Pick<PageParams, 'pageNo' | 'pageSize'> &
|
|
|
|
|
|
Pick<Product, 'directionCode' | 'managerUserId' | 'statusCode'> & {
|
|
|
|
|
|
keyword: string;
|
|
|
|
|
|
updateTime: string[];
|
|
|
|
|
|
}
|
|
|
|
|
|
>;
|
|
|
|
|
|
|
|
|
|
|
|
type SaveProductParams = Pick<Product, 'directionCode' | 'name' | 'managerUserId'> & {
|
|
|
|
|
|
code?: string | null;
|
|
|
|
|
|
description?: string | null;
|
|
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
type UpdateProductParams = { id: string } & SaveProductParams;
|
|
|
|
|
|
|
|
|
|
|
|
interface ChangeProductStatusParams {
|
|
|
|
|
|
id: string;
|
|
|
|
|
|
actionCode: ProductStatusActionCode;
|
|
|
|
|
|
reason?: string | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface DeleteProductParams {
|
|
|
|
|
|
id: string;
|
|
|
|
|
|
productName: string;
|
|
|
|
|
|
reason: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type UpdateProductSettingBaseInfoParams = Pick<ProductSettingBaseInfo, 'directionCode' | 'name'> & {
|
|
|
|
|
|
description?: string | null;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
interface CreateProductMemberParams {
|
|
|
|
|
|
userId: string;
|
|
|
|
|
|
roleId: string;
|
|
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
previousManagerUserId?: string | null;
|
|
|
|
|
|
previousManagerRoleId?: string | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface UpdateProductMemberParams {
|
|
|
|
|
|
roleId: string;
|
|
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
reason?: string | null;
|
|
|
|
|
|
previousManagerUserId?: string | null;
|
|
|
|
|
|
previousManagerRoleId?: string | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface InactiveProductMemberParams {
|
|
|
|
|
|
reason?: string | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|