8d0ddbb5ef
- 补充 RefObject import(local-captcha、slider-captcha、node-group-form) - 删除 slider-captcha 中无用的 _scaleX/_scaleY 变量 - user_subscribe_id 类型转换 number → string - 移除 services 文件中失效的 @ts-expect-error 指令
86 lines
2.3 KiB
TypeScript
86 lines
2.3 KiB
TypeScript
/* eslint-disable */
|
|
import request from "@workspace/ui/lib/request";
|
|
|
|
/** Update Payment Method PUT /v1/admin/payment/ */
|
|
export async function updatePaymentMethod(
|
|
body: API.UpdatePaymentMethodRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.PaymentConfig }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/`,
|
|
{
|
|
method: "PUT",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Create Payment Method POST /v1/admin/payment/ */
|
|
export async function createPaymentMethod(
|
|
body: API.CreatePaymentMethodRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.PaymentConfig }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/`,
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Delete Payment Method DELETE /v1/admin/payment/ */
|
|
export async function deletePaymentMethod(
|
|
body: API.DeletePaymentMethodRequest,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: any }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/`,
|
|
{
|
|
method: "DELETE",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Get Payment Method List GET /v1/admin/payment/list */
|
|
export async function getPaymentMethodList(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.GetPaymentMethodListParams,
|
|
options?: { [key: string]: any }
|
|
) {
|
|
return request<API.Response & { data?: API.GetPaymentMethodListResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/list`,
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/** Get supported payment platform GET /v1/admin/payment/platform */
|
|
export async function getPaymentPlatform(options?: { [key: string]: any }) {
|
|
return request<API.Response & { data?: API.PlatformResponse }>(
|
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/platform`,
|
|
{
|
|
method: "GET",
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|