- 新增家庭共享订阅管理 - 新增用户邀请统计 - 新增签名和订阅模式设置表单 - 更新 API 服务层和国际化文件 - UI 组件优化(enhanced-input、pro-table)
This commit is contained in:
@@ -1,43 +1,14 @@
|
||||
// @ts-expect-error
|
||||
/* eslint-disable */
|
||||
import request from "@workspace/ui/lib/request";
|
||||
|
||||
/** Toggle redemption code status PUT /v1/admin/redemption/code/status */
|
||||
export async function toggleRedemptionCodeStatus(
|
||||
body: API.ToggleRedemptionCodeStatusRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: any }>(
|
||||
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/redemption/code/status`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/** Update redemption code PUT /v1/admin/redemption/code */
|
||||
export async function updateRedemptionCode(
|
||||
body: API.UpdateRedemptionCodeRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: any }>(
|
||||
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/redemption/code`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/** Create redemption code POST /v1/admin/redemption/code */
|
||||
/**
|
||||
* 创建兑换码
|
||||
* POST /v1/admin/redemption/code
|
||||
* @param body - 创建兑换码请求参数
|
||||
* @param options - 可选的请求配置
|
||||
* @returns 创建结果
|
||||
*/
|
||||
export async function createRedemptionCode(
|
||||
body: API.CreateRedemptionCodeRequest,
|
||||
options?: { [key: string]: any }
|
||||
@@ -55,7 +26,37 @@ export async function createRedemptionCode(
|
||||
);
|
||||
}
|
||||
|
||||
/** Delete redemption code DELETE /v1/admin/redemption/code */
|
||||
/**
|
||||
* 更新兑换码
|
||||
* PUT /v1/admin/redemption/code
|
||||
* @param body - 更新兑换码请求参数
|
||||
* @param options - 可选的请求配置
|
||||
* @returns 更新结果
|
||||
*/
|
||||
export async function updateRedemptionCode(
|
||||
body: API.UpdateRedemptionCodeRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: any }>(
|
||||
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/redemption/code`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除兑换码
|
||||
* DELETE /v1/admin/redemption/code
|
||||
* @param body - 删除兑换码请求参数
|
||||
* @param options - 可选的请求配置
|
||||
* @returns 删除结果
|
||||
*/
|
||||
export async function deleteRedemptionCode(
|
||||
body: API.DeleteRedemptionCodeRequest,
|
||||
options?: { [key: string]: any }
|
||||
@@ -73,7 +74,13 @@ export async function deleteRedemptionCode(
|
||||
);
|
||||
}
|
||||
|
||||
/** Batch delete redemption code DELETE /v1/admin/redemption/code/batch */
|
||||
/**
|
||||
* 批量删除兑换码
|
||||
* DELETE /v1/admin/redemption/code/batch
|
||||
* @param body - 批量删除请求参数,包含 ids 数组
|
||||
* @param options - 可选的请求配置
|
||||
* @returns 批量删除结果
|
||||
*/
|
||||
export async function batchDeleteRedemptionCode(
|
||||
body: API.BatchDeleteRedemptionCodeRequest,
|
||||
options?: { [key: string]: any }
|
||||
@@ -91,9 +98,15 @@ export async function batchDeleteRedemptionCode(
|
||||
);
|
||||
}
|
||||
|
||||
/** Get redemption code list GET /v1/admin/redemption/code/list */
|
||||
/**
|
||||
* 获取兑换码列表
|
||||
* GET /v1/admin/redemption/code/list
|
||||
* @param params - 分页及筛选参数
|
||||
* @param options - 可选的请求配置
|
||||
* @returns 兑换码列表及总数
|
||||
*/
|
||||
export async function getRedemptionCodeList(
|
||||
params: API.GetRedemptionCodeListRequest,
|
||||
params: API.GetRedemptionCodeListParams,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetRedemptionCodeListResponse }>(
|
||||
@@ -108,9 +121,39 @@ export async function getRedemptionCodeList(
|
||||
);
|
||||
}
|
||||
|
||||
/** Get redemption record list GET /v1/admin/redemption/record/list */
|
||||
/**
|
||||
* 切换兑换码状态(启用/禁用)
|
||||
* PUT /v1/admin/redemption/code/status
|
||||
* @param body - 切换状态请求参数
|
||||
* @param options - 可选的请求配置
|
||||
* @returns 切换结果
|
||||
*/
|
||||
export async function toggleRedemptionCodeStatus(
|
||||
body: API.ToggleRedemptionCodeStatusRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: any }>(
|
||||
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/redemption/code/status`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取兑换记录列表
|
||||
* GET /v1/admin/redemption/record/list
|
||||
* @param params - 分页及筛选参数
|
||||
* @param options - 可选的请求配置
|
||||
* @returns 兑换记录列表及总数
|
||||
*/
|
||||
export async function getRedemptionRecordList(
|
||||
params: API.GetRedemptionRecordListRequest,
|
||||
params: API.GetRedemptionRecordListParams,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetRedemptionRecordListResponse }>(
|
||||
|
||||
Reference in New Issue
Block a user