This commit is contained in:
46
src/types/api/assetWallet.ts
Normal file
46
src/types/api/assetWallet.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* 资产钱包相关类型定义
|
||||
*/
|
||||
|
||||
/**
|
||||
* 自动续费适用范围
|
||||
*/
|
||||
export type AssetAutoRenewalScope = 'all' | 'specified'
|
||||
|
||||
/**
|
||||
* 资产钱包自动续费配置对象
|
||||
*/
|
||||
export interface AssetAutoRenewalConfig {
|
||||
/** 总开关(1:开启,0:关闭) */
|
||||
enabled: 0 | 1
|
||||
/** 总开关名称 */
|
||||
enabled_name: string
|
||||
/** 适用范围(all:全部主套餐,specified:指定主套餐) */
|
||||
scope: AssetAutoRenewalScope
|
||||
/** 适用范围名称 */
|
||||
scope_name: string
|
||||
/** 指定主套餐ID列表(scope=specified 时非空) */
|
||||
package_ids: number[]
|
||||
/** 统一到期前天数(1-90) */
|
||||
days_before_expiry: number
|
||||
/** 配置版本 */
|
||||
config_version: number
|
||||
/** 最近保存操作者 */
|
||||
updater: string
|
||||
/** 最近保存时间 */
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新资产钱包自动续费配置请求参数
|
||||
*/
|
||||
export interface UpdateAssetAutoRenewalConfigRequest {
|
||||
/** 总开关(0/1,必填) */
|
||||
enabled: 0 | 1
|
||||
/** 适用范围(all/specified,必填) */
|
||||
scope: AssetAutoRenewalScope
|
||||
/** 指定主套餐ID列表(scope=specified 时必填非空且仅当前可售主套餐) */
|
||||
package_ids: number[]
|
||||
/** 统一到期前天数(1-90,必填) */
|
||||
days_before_expiry: number
|
||||
}
|
||||
@@ -147,3 +147,9 @@ export * from './h5PopupConfiguration'
|
||||
|
||||
// 套餐真流量预警相关
|
||||
export * from './packageTrafficAlert'
|
||||
|
||||
// 轮询优先队列相关
|
||||
export * from './pollingPriorityQueue'
|
||||
|
||||
// 资产钱包自动续费相关
|
||||
export * from './assetWallet'
|
||||
|
||||
171
src/types/api/pollingPriorityQueue.ts
Normal file
171
src/types/api/pollingPriorityQueue.ts
Normal file
@@ -0,0 +1,171 @@
|
||||
/**
|
||||
* 轮询优先队列相关类型定义
|
||||
*/
|
||||
|
||||
/**
|
||||
* 优先轮询任务类型
|
||||
*/
|
||||
export type PollingPriorityTaskType =
|
||||
| 'polling:realname'
|
||||
| 'polling:carddata'
|
||||
| 'polling:package'
|
||||
| 'polling:card_status'
|
||||
|
||||
/**
|
||||
* 优先轮询项状态
|
||||
*/
|
||||
export type PollingPriorityItemStatus = 'pending' | 'processing' | 'completed' | 'failed'
|
||||
|
||||
/**
|
||||
* 优先轮询项触发类型
|
||||
*/
|
||||
export type PollingPriorityTriggerType =
|
||||
| 'purchase_activated'
|
||||
| 'renewal_activated'
|
||||
| 'queue_activated'
|
||||
| 'addon_activated'
|
||||
| 'no_valid_package'
|
||||
| 'manual_trigger'
|
||||
|
||||
/**
|
||||
* 优先轮询执行结果
|
||||
*/
|
||||
export type PollingPriorityResult = 'success' | 'failed' | ''
|
||||
|
||||
/**
|
||||
* 优先轮询项对象
|
||||
*/
|
||||
export interface PollingPriorityItem {
|
||||
/** 优先轮询项ID */
|
||||
id: number
|
||||
/** 卡ID */
|
||||
card_id: number
|
||||
/** 卡ICCID */
|
||||
iccid: string
|
||||
/** 任务类型 */
|
||||
task_type: PollingPriorityTaskType
|
||||
/** 任务类型名称 */
|
||||
task_type_name: string
|
||||
/** 状态 */
|
||||
status: PollingPriorityItemStatus
|
||||
/** 状态名称 */
|
||||
status_name: string
|
||||
/** 触发类型 */
|
||||
trigger_type: PollingPriorityTriggerType
|
||||
/** 触发类型名称 */
|
||||
trigger_type_name: string
|
||||
/** 触发类型列表 */
|
||||
trigger_types: PollingPriorityTriggerType[]
|
||||
/** 触发次数 */
|
||||
trigger_count: number
|
||||
/** 尝试次数 */
|
||||
attempt_count: number
|
||||
/** 执行结果 */
|
||||
result: PollingPriorityResult
|
||||
/** 执行结果名称 */
|
||||
result_name: string
|
||||
/** 失败原因 */
|
||||
failure_reason: string | null
|
||||
/** 店铺快照ID */
|
||||
shop_id_snapshot: number | null
|
||||
/** 来源订单ID */
|
||||
source_order_id: number | null
|
||||
/** 来源套餐使用记录ID */
|
||||
source_package_usage_id: number | null
|
||||
/** 人工操作者ID */
|
||||
manual_operator_id: number | null
|
||||
/** 人工操作者名称 */
|
||||
manual_operator_name: string | null
|
||||
/** 人工入队原因 */
|
||||
manual_reason: string | null
|
||||
/** 认领时间 */
|
||||
claimed_at: string | null
|
||||
/** 最后触发时间 */
|
||||
last_triggered_at: string | null
|
||||
/** 创建时间 */
|
||||
created_at: string
|
||||
/** 更新时间 */
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 优先轮询项查询参数
|
||||
*/
|
||||
export interface PollingPriorityItemQueryParams {
|
||||
/** 页码(默认1,最小1) */
|
||||
page?: number
|
||||
/** 每页数量(默认20,最大100) */
|
||||
page_size?: number
|
||||
/** 卡ID筛选 */
|
||||
card_id?: number
|
||||
/** 任务类型筛选 */
|
||||
task_type?: PollingPriorityTaskType
|
||||
/** 状态筛选 */
|
||||
status?: PollingPriorityItemStatus
|
||||
/** 触发类型筛选 */
|
||||
trigger_type?: PollingPriorityTriggerType
|
||||
}
|
||||
|
||||
/**
|
||||
* 优先轮询项分页响应
|
||||
*/
|
||||
export interface PollingPriorityItemPageResult {
|
||||
/** 优先轮询项列表 */
|
||||
items: PollingPriorityItem[]
|
||||
/** 当前页 */
|
||||
page: number
|
||||
/** 每页数量 */
|
||||
size: number
|
||||
/** 总数 */
|
||||
total: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工优先入队请求参数
|
||||
*/
|
||||
export interface CreatePollingPriorityItemRequest {
|
||||
/** 卡ID */
|
||||
card_id: number
|
||||
/** 入队原因(必填,最长500字符) */
|
||||
reason: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工入队结果项
|
||||
*/
|
||||
export interface PriorityItemResult {
|
||||
/** 优先轮询项ID */
|
||||
id: number
|
||||
/** 卡ID */
|
||||
card_id: number
|
||||
/** 卡ICCID */
|
||||
iccid: string
|
||||
/** 任务类型 */
|
||||
task_type: PollingPriorityTaskType
|
||||
/** 任务类型名称 */
|
||||
task_type_name: string
|
||||
/** 状态 */
|
||||
status: PollingPriorityItemStatus
|
||||
/** 状态名称 */
|
||||
status_name: string
|
||||
/** 触发次数 */
|
||||
trigger_count: number
|
||||
/** 创建时间 */
|
||||
created_at: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工优先入队响应
|
||||
*/
|
||||
export interface CreatePollingPriorityItemResponse {
|
||||
/** 新建数量 */
|
||||
created_count: number
|
||||
/** 合并数量 */
|
||||
merged_count: number
|
||||
/** 涉及任务类型列表 */
|
||||
task_types: PollingPriorityTaskType[]
|
||||
/** 涉及任务类型名称列表 */
|
||||
task_type_names: string[]
|
||||
/** 入队结果项列表 */
|
||||
items: PriorityItemResult[]
|
||||
}
|
||||
Reference in New Issue
Block a user