♻️ refactor: Refactor API endpoints to use dynamic API prefix from environment variables

- Updated all service files to replace hardcoded API paths with `${import.meta.env.VITE_API_PREFIX}` for better configurability.
- Ensured consistency across user, common, and gateway services by applying the new API prefix format.
- Removed unnecessary comments and maintained ESLint disable directives where applicable.
This commit is contained in:
web@ppanel 2025-12-11 03:58:26 +00:00
parent 99e7f6062d
commit ae5e95477c
45 changed files with 676 additions and 551 deletions

View File

@ -135,7 +135,7 @@
[ [
"@semantic-release/exec", "@semantic-release/exec",
{ {
"prepareCmd": "bun run build && tar -czf admin.tar.gz -C apps/admin/dist . && tar -czf user.tar.gz -C apps/user/dist ." "prepareCmd": "bun run build && tar -czf admin.tar.gz -C apps/admin/dist . && tar -czf user.tar.gz -C apps/user/dist . && echo 'VITE_API_PREFIX=/api' > apps/admin/.env && echo 'VITE_API_PREFIX=/api' > apps/user/.env && bun run build && tar -czf admin-with-api.tar.gz -C apps/admin/dist . && tar -czf user-with-api.tar.gz -C apps/user/dist ."
} }
], ],
[ [
@ -144,11 +144,23 @@
"assets": [ "assets": [
{ {
"path": "admin.tar.gz", "path": "admin.tar.gz",
"name": "ppanel-admin-web.tar.gz" "name": "ppanel-admin-web.tar.gz",
"label": "Admin Web (without API prefix)"
}, },
{ {
"path": "user.tar.gz", "path": "user.tar.gz",
"name": "ppanel-user-web.tar.gz" "name": "ppanel-user-web.tar.gz",
"label": "User Web (without API prefix)"
},
{
"path": "admin-with-api.tar.gz",
"name": "ppanel-admin-web-with-api.tar.gz",
"label": "Admin Web (with /api prefix)"
},
{
"path": "user-with-api.tar.gz",
"name": "ppanel-user-web-with-api.tar.gz",
"label": "User Web (with /api prefix)"
} }
] ]
} }

View File

@ -19,6 +19,20 @@ This document records all notable changes to ShadCN Admin.
--- ---
## [1.2.0](https://github.com/perfect-panel/frontend/compare/v1.1.3...v1.2.0) (2025-12-11)
### ✨ Features / 新功能
* update localization files and improve system version management ([3cf6a5c](https://github.com/perfect-panel/frontend/commit/3cf6a5cfb47ea872d6e07be0d89304dc80ed61bb))
### 📚 Documentation / 文档更新
* Add documentation ([99e7f60](https://github.com/perfect-panel/frontend/commit/99e7f6062db81143e7b8e3692d626ebafe6e731f))
### 🔧 Chores / 其他变更
* **release:** Release 1.2.0-dev.1 / 发布版本 1.2.0-dev.1 [skip ci] ([50e695a](https://github.com/perfect-panel/frontend/commit/50e695a1bb156f7176b2af0db26b59f70124ad61))
## [1.2.0-dev.1](https://github.com/perfect-panel/frontend/compare/v1.1.3...v1.2.0-dev.1) (2025-12-01) ## [1.2.0-dev.1](https://github.com/perfect-panel/frontend/compare/v1.1.3...v1.2.0-dev.1) (2025-12-01)
### ✨ Features / 新功能 ### ✨ Features / 新功能

View File

@ -1,5 +1,7 @@
# API base URL # API base URL
VITE_API_BASE_URL= VITE_API_BASE_URL=
# API prefix path
VITE_API_PREFIX=
# CDN URL for static assets # CDN URL for static assets
VITE_CDN_URL=https://cdn.jsdmirror.com VITE_CDN_URL=https://cdn.jsdmirror.com

View File

@ -1,5 +1,7 @@
# API base URL # API base URL
VITE_API_BASE_URL= VITE_API_BASE_URL=
# API prefix path
VITE_API_PREFIX=
# CDN URL for static assets # CDN URL for static assets
VITE_CDN_URL=https://cdn.jsdmirror.com VITE_CDN_URL=https://cdn.jsdmirror.com

View File

@ -86,7 +86,7 @@ export default function Recharge(
const response = await recharge(params); const response = await recharge(params);
const orderNo = response.data.data?.order_no; const orderNo = response.data.data?.order_no;
if (orderNo) { if (orderNo) {
window.location.href = `/payment?order_no=${orderNo}`; window.location.href = `/#/payment?order_no=${orderNo}`;
setOpen(false); setOpen(false);
} }
} catch (_error) { } catch (_error) {

View File

@ -90,7 +90,7 @@ export default function Renewal({ id, subscribe }: Readonly<RenewalProps>) {
const orderNo = response.data.data?.order_no; const orderNo = response.data.data?.order_no;
if (orderNo) { if (orderNo) {
getUserInfo(); getUserInfo();
window.location.href = `/payment?order_no=${orderNo}`; window.location.href = `/#/payment?order_no=${orderNo}`;
} }
} catch (_error) { } catch (_error) {
/* empty */ /* empty */

View File

@ -88,7 +88,7 @@ export default function ResetTraffic({
const orderNo = response.data.data?.order_no; const orderNo = response.data.data?.order_no;
if (orderNo) { if (orderNo) {
getUserInfo(); getUserInfo();
window.location.href = `/payment?order_no=${orderNo}`; window.location.href = `/#/payment?order_no=${orderNo}`;
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);

View File

@ -1,6 +1,6 @@
{ {
"name": "frontend", "name": "frontend",
"version": "1.2.0-dev.1", "version": "1.2.0",
"private": true, "private": true,
"homepage": "https://github.com/perfect-panel/frontend", "homepage": "https://github.com/perfect-panel/frontend",
"bugs": { "bugs": {

View File

@ -1,7 +1,7 @@
const baseConfig = { const baseConfig = {
requestLibPath: "import request from '@workspace/ui/lib/request';", requestLibPath: "import request from '@workspace/ui/lib/request';",
serversPath: "./src/services", serversPath: "./src/services",
apiPrefix: "'/api'", apiPrefix: "import.meta.env.VITE_API_PREFIX",
}; };
const config = [ const config = [

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function updateAds(
body: API.UpdateAdsRequest, body: API.UpdateAdsRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/ads/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Create Ads POST /v1/admin/ads/ */ /** Create Ads POST /v1/admin/ads/ */
@ -22,14 +24,17 @@ export async function createAds(
body: API.CreateAdsRequest, body: API.CreateAdsRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/ads/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Delete Ads DELETE /v1/admin/ads/ */ /** Delete Ads DELETE /v1/admin/ads/ */
@ -37,14 +42,17 @@ export async function deleteAds(
body: API.DeleteAdsRequest, body: API.DeleteAdsRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/ads/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get Ads Detail GET /v1/admin/ads/detail */ /** Get Ads Detail GET /v1/admin/ads/detail */
@ -54,7 +62,7 @@ export async function getAdsDetail(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.Ads }>( return request<API.Response & { data?: API.Ads }>(
"/api/v1/admin/ads/detail", `${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/detail`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -72,7 +80,7 @@ export async function getAdsList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetAdsListResponse }>( return request<API.Response & { data?: API.GetAdsListResponse }>(
"/api/v1/admin/ads/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/list`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function updateAnnouncement(
body: API.UpdateAnnouncementRequest, body: API.UpdateAnnouncementRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Create announcement POST /v1/admin/announcement/ */ /** Create announcement POST /v1/admin/announcement/ */
@ -22,14 +24,17 @@ export async function createAnnouncement(
body: API.CreateAnnouncementRequest, body: API.CreateAnnouncementRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Delete announcement DELETE /v1/admin/announcement/ */ /** Delete announcement DELETE /v1/admin/announcement/ */
@ -37,14 +42,17 @@ export async function deleteAnnouncement(
body: API.DeleteAnnouncementRequest, body: API.DeleteAnnouncementRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get announcement GET /v1/admin/announcement/detail */ /** Get announcement GET /v1/admin/announcement/detail */
@ -54,7 +62,7 @@ export async function getAnnouncement(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.Announcement }>( return request<API.Response & { data?: API.Announcement }>(
"/api/v1/admin/announcement/detail", `${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/detail`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -72,7 +80,7 @@ export async function getAnnouncementList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetAnnouncementListResponse }>( return request<API.Response & { data?: API.GetAnnouncementListResponse }>(
"/api/v1/admin/announcement/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/list`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -8,7 +7,7 @@ export async function createSubscribeApplication(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.SubscribeApplication }>( return request<API.Response & { data?: API.SubscribeApplication }>(
"/api/v1/admin/application/", `${import.meta.env.VITE_API_PREFIX}/v1/admin/application/`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -28,7 +27,7 @@ export async function previewSubscribeTemplate(
) { ) {
return request< return request<
API.Response & { data?: API.PreviewSubscribeTemplateResponse } API.Response & { data?: API.PreviewSubscribeTemplateResponse }
>("/api/v1/admin/application/preview", { >(`${import.meta.env.VITE_API_PREFIX}/v1/admin/application/preview`, {
method: "GET", method: "GET",
params: { params: {
...params, ...params,
@ -43,7 +42,9 @@ export async function updateSubscribeApplication(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.SubscribeApplication }>( return request<API.Response & { data?: API.SubscribeApplication }>(
"/api/v1/admin/application/subscribe_application", `${
import.meta.env.VITE_API_PREFIX
}/v1/admin/application/subscribe_application`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -61,7 +62,9 @@ export async function deleteSubscribeApplication(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/application/subscribe_application", `${
import.meta.env.VITE_API_PREFIX
}/v1/admin/application/subscribe_application`,
{ {
method: "DELETE", method: "DELETE",
headers: { headers: {
@ -81,11 +84,16 @@ export async function getSubscribeApplicationList(
) { ) {
return request< return request<
API.Response & { data?: API.GetSubscribeApplicationListResponse } API.Response & { data?: API.GetSubscribeApplicationListResponse }
>("/api/v1/admin/application/subscribe_application_list", { >(
`${
import.meta.env.VITE_API_PREFIX
}/v1/admin/application/subscribe_application_list`,
{
method: "GET", method: "GET",
params: { params: {
...params, ...params,
}, },
...(options || {}), ...(options || {}),
}); }
);
} }

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -9,7 +8,7 @@ export async function getAuthMethodConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.AuthMethodConfig }>( return request<API.Response & { data?: API.AuthMethodConfig }>(
"/api/v1/admin/auth-method/config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/config`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -26,7 +25,7 @@ export async function updateAuthMethodConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.AuthMethodConfig }>( return request<API.Response & { data?: API.AuthMethodConfig }>(
"/api/v1/admin/auth-method/config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -41,7 +40,7 @@ export async function updateAuthMethodConfig(
/** Get email support platform GET /v1/admin/auth-method/email_platform */ /** Get email support platform GET /v1/admin/auth-method/email_platform */
export async function getEmailPlatform(options?: { [key: string]: any }) { export async function getEmailPlatform(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.PlatformResponse }>( return request<API.Response & { data?: API.PlatformResponse }>(
"/api/v1/admin/auth-method/email_platform", `${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/email_platform`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -52,7 +51,7 @@ export async function getEmailPlatform(options?: { [key: string]: any }) {
/** Get auth method list GET /v1/admin/auth-method/list */ /** Get auth method list GET /v1/admin/auth-method/list */
export async function getAuthMethodList(options?: { [key: string]: any }) { export async function getAuthMethodList(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetAuthMethodListResponse }>( return request<API.Response & { data?: API.GetAuthMethodListResponse }>(
"/api/v1/admin/auth-method/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/list`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -63,7 +62,7 @@ export async function getAuthMethodList(options?: { [key: string]: any }) {
/** Get sms support platform GET /v1/admin/auth-method/sms_platform */ /** Get sms support platform GET /v1/admin/auth-method/sms_platform */
export async function getSmsPlatform(options?: { [key: string]: any }) { export async function getSmsPlatform(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.PlatformResponse }>( return request<API.Response & { data?: API.PlatformResponse }>(
"/api/v1/admin/auth-method/sms_platform", `${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/sms_platform`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -77,7 +76,7 @@ export async function testEmailSend(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/auth-method/test_email_send", `${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/test_email_send`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -95,7 +94,7 @@ export async function testSmsSend(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/auth-method/test_sms_send", `${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/test_sms_send`,
{ {
method: "POST", method: "POST",
headers: { headers: {

View File

@ -1,11 +1,10 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
/** Query revenue statistics GET /v1/admin/console/revenue */ /** Query revenue statistics GET /v1/admin/console/revenue */
export async function queryRevenueStatistics(options?: { [key: string]: any }) { export async function queryRevenueStatistics(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.RevenueStatisticsResponse }>( return request<API.Response & { data?: API.RevenueStatisticsResponse }>(
"/api/v1/admin/console/revenue", `${import.meta.env.VITE_API_PREFIX}/v1/admin/console/revenue`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -16,7 +15,7 @@ export async function queryRevenueStatistics(options?: { [key: string]: any }) {
/** Query server total data GET /v1/admin/console/server */ /** Query server total data GET /v1/admin/console/server */
export async function queryServerTotalData(options?: { [key: string]: any }) { export async function queryServerTotalData(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.ServerTotalDataResponse }>( return request<API.Response & { data?: API.ServerTotalDataResponse }>(
"/api/v1/admin/console/server", `${import.meta.env.VITE_API_PREFIX}/v1/admin/console/server`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -27,7 +26,7 @@ export async function queryServerTotalData(options?: { [key: string]: any }) {
/** Query ticket wait reply GET /v1/admin/console/ticket */ /** Query ticket wait reply GET /v1/admin/console/ticket */
export async function queryTicketWaitReply(options?: { [key: string]: any }) { export async function queryTicketWaitReply(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.TicketWaitRelpyResponse }>( return request<API.Response & { data?: API.TicketWaitRelpyResponse }>(
"/api/v1/admin/console/ticket", `${import.meta.env.VITE_API_PREFIX}/v1/admin/console/ticket`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -38,7 +37,7 @@ export async function queryTicketWaitReply(options?: { [key: string]: any }) {
/** Query user statistics GET /v1/admin/console/user */ /** Query user statistics GET /v1/admin/console/user */
export async function queryUserStatistics(options?: { [key: string]: any }) { export async function queryUserStatistics(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.UserStatisticsResponse }>( return request<API.Response & { data?: API.UserStatisticsResponse }>(
"/api/v1/admin/console/user", `${import.meta.env.VITE_API_PREFIX}/v1/admin/console/user`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function updateCoupon(
body: API.UpdateCouponRequest, body: API.UpdateCouponRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Create coupon POST /v1/admin/coupon/ */ /** Create coupon POST /v1/admin/coupon/ */
@ -22,14 +24,17 @@ export async function createCoupon(
body: API.CreateCouponRequest, body: API.CreateCouponRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Delete coupon DELETE /v1/admin/coupon/ */ /** Delete coupon DELETE /v1/admin/coupon/ */
@ -37,14 +42,17 @@ export async function deleteCoupon(
body: API.DeleteCouponRequest, body: API.DeleteCouponRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Batch delete coupon DELETE /v1/admin/coupon/batch */ /** Batch delete coupon DELETE /v1/admin/coupon/batch */
@ -52,14 +60,17 @@ export async function batchDeleteCoupon(
body: API.BatchDeleteCouponRequest, body: API.BatchDeleteCouponRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/batch", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/batch`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get coupon list GET /v1/admin/coupon/list */ /** Get coupon list GET /v1/admin/coupon/list */
@ -69,7 +80,7 @@ export async function getCouponList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetCouponListResponse }>( return request<API.Response & { data?: API.GetCouponListResponse }>(
"/api/v1/admin/coupon/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/list`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function updateDocument(
body: API.UpdateDocumentRequest, body: API.UpdateDocumentRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/document/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Create document POST /v1/admin/document/ */ /** Create document POST /v1/admin/document/ */
@ -22,14 +24,17 @@ export async function createDocument(
body: API.CreateDocumentRequest, body: API.CreateDocumentRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/document/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Delete document DELETE /v1/admin/document/ */ /** Delete document DELETE /v1/admin/document/ */
@ -37,14 +42,17 @@ export async function deleteDocument(
body: API.DeleteDocumentRequest, body: API.DeleteDocumentRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/document/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Batch delete document DELETE /v1/admin/document/batch */ /** Batch delete document DELETE /v1/admin/document/batch */
@ -53,7 +61,7 @@ export async function batchDeleteDocument(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/document/batch", `${import.meta.env.VITE_API_PREFIX}/v1/admin/document/batch`,
{ {
method: "DELETE", method: "DELETE",
headers: { headers: {
@ -68,7 +76,7 @@ export async function batchDeleteDocument(
/** Get document detail GET /v1/admin/document/detail */ /** Get document detail GET /v1/admin/document/detail */
export async function getDocumentDetail(options?: { [key: string]: any }) { export async function getDocumentDetail(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.Document }>( return request<API.Response & { data?: API.Document }>(
"/api/v1/admin/document/detail", `${import.meta.env.VITE_API_PREFIX}/v1/admin/document/detail`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -83,7 +91,7 @@ export async function getDocumentList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetDocumentListResponse }>( return request<API.Response & { data?: API.GetDocumentListResponse }>(
"/api/v1/admin/document/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/document/list`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
// API 更新时间: // API 更新时间:
// API 唯一标识: // API 唯一标识:

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -9,7 +8,7 @@ export async function filterBalanceLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterBalanceLogResponse }>( return request<API.Response & { data?: API.FilterBalanceLogResponse }>(
"/api/v1/admin/log/balance/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/balance/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -27,7 +26,7 @@ export async function filterCommissionLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterCommissionLogResponse }>( return request<API.Response & { data?: API.FilterCommissionLogResponse }>(
"/api/v1/admin/log/commission/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/commission/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -45,7 +44,7 @@ export async function filterEmailLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterEmailLogResponse }>( return request<API.Response & { data?: API.FilterEmailLogResponse }>(
"/api/v1/admin/log/email/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/email/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -63,7 +62,7 @@ export async function filterGiftLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterGiftLogResponse }>( return request<API.Response & { data?: API.FilterGiftLogResponse }>(
"/api/v1/admin/log/gift/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/gift/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -81,7 +80,7 @@ export async function filterLoginLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterLoginLogResponse }>( return request<API.Response & { data?: API.FilterLoginLogResponse }>(
"/api/v1/admin/log/login/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/login/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -99,7 +98,7 @@ export async function getMessageLogList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetMessageLogListResponse }>( return request<API.Response & { data?: API.GetMessageLogListResponse }>(
"/api/v1/admin/log/message/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/message/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -117,7 +116,7 @@ export async function filterMobileLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterMobileLogResponse }>( return request<API.Response & { data?: API.FilterMobileLogResponse }>(
"/api/v1/admin/log/mobile/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/mobile/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -135,7 +134,7 @@ export async function filterRegisterLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterRegisterLogResponse }>( return request<API.Response & { data?: API.FilterRegisterLogResponse }>(
"/api/v1/admin/log/register/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/register/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -153,7 +152,7 @@ export async function filterServerTrafficLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterServerTrafficLogResponse }>( return request<API.Response & { data?: API.FilterServerTrafficLogResponse }>(
"/api/v1/admin/log/server/traffic/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/server/traffic/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -167,7 +166,7 @@ export async function filterServerTrafficLog(
/** Get log setting GET /v1/admin/log/setting */ /** Get log setting GET /v1/admin/log/setting */
export async function getLogSetting(options?: { [key: string]: any }) { export async function getLogSetting(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.LogSetting }>( return request<API.Response & { data?: API.LogSetting }>(
"/api/v1/admin/log/setting", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/setting`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -180,14 +179,17 @@ export async function updateLogSetting(
body: API.LogSetting, body: API.LogSetting,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/log/setting", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/setting`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Filter subscribe log GET /v1/admin/log/subscribe/list */ /** Filter subscribe log GET /v1/admin/log/subscribe/list */
@ -197,7 +199,7 @@ export async function filterSubscribeLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterSubscribeLogResponse }>( return request<API.Response & { data?: API.FilterSubscribeLogResponse }>(
"/api/v1/admin/log/subscribe/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/subscribe/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -215,7 +217,7 @@ export async function filterResetSubscribeLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterResetSubscribeLogResponse }>( return request<API.Response & { data?: API.FilterResetSubscribeLogResponse }>(
"/api/v1/admin/log/subscribe/reset/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/subscribe/reset/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -233,7 +235,7 @@ export async function filterUserSubscribeTrafficLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterSubscribeTrafficResponse }>( return request<API.Response & { data?: API.FilterSubscribeTrafficResponse }>(
"/api/v1/admin/log/subscribe/traffic/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/subscribe/traffic/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -251,7 +253,7 @@ export async function filterTrafficLogDetails(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterTrafficLogDetailsResponse }>( return request<API.Response & { data?: API.FilterTrafficLogDetailsResponse }>(
"/api/v1/admin/log/traffic/details", `${import.meta.env.VITE_API_PREFIX}/v1/admin/log/traffic/details`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -10,7 +9,7 @@ export async function getBatchSendEmailTaskList(
) { ) {
return request< return request<
API.Response & { data?: API.GetBatchSendEmailTaskListResponse } API.Response & { data?: API.GetBatchSendEmailTaskListResponse }
>("/api/v1/admin/marketing/email/batch/list", { >(`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/email/batch/list`, {
method: "GET", method: "GET",
params: { params: {
...params, ...params,
@ -25,7 +24,9 @@ export async function getPreSendEmailCount(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetPreSendEmailCountResponse }>( return request<API.Response & { data?: API.GetPreSendEmailCountResponse }>(
"/api/v1/admin/marketing/email/batch/pre-send-count", `${
import.meta.env.VITE_API_PREFIX
}/v1/admin/marketing/email/batch/pre-send-count`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -43,7 +44,7 @@ export async function createBatchSendEmailTask(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/marketing/email/batch/send", `${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/email/batch/send`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -62,14 +63,17 @@ export async function getBatchSendEmailTaskStatus(
) { ) {
return request< return request<
API.Response & { data?: API.GetBatchSendEmailTaskStatusResponse } API.Response & { data?: API.GetBatchSendEmailTaskStatusResponse }
>("/api/v1/admin/marketing/email/batch/status", { >(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/email/batch/status`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Stop a batch send email task POST /v1/admin/marketing/email/batch/stop */ /** Stop a batch send email task POST /v1/admin/marketing/email/batch/stop */
@ -78,7 +82,7 @@ export async function stopBatchSendEmailTask(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/marketing/email/batch/stop", `${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/email/batch/stop`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -96,7 +100,7 @@ export async function createQuotaTask(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/marketing/quota/create", `${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/quota/create`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -115,7 +119,7 @@ export async function queryQuotaTaskList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QueryQuotaTaskListResponse }>( return request<API.Response & { data?: API.QueryQuotaTaskListResponse }>(
"/api/v1/admin/marketing/quota/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/quota/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -132,7 +136,7 @@ export async function queryQuotaTaskPreCount(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QueryQuotaTaskPreCountResponse }>( return request<API.Response & { data?: API.QueryQuotaTaskPreCountResponse }>(
"/api/v1/admin/marketing/quota/pre-count", `${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/quota/pre-count`,
{ {
method: "POST", method: "POST",
headers: { headers: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function createOrder(
body: API.CreateOrderRequest, body: API.CreateOrderRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/order/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/order/`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get order list GET /v1/admin/order/list */ /** Get order list GET /v1/admin/order/list */
@ -24,7 +26,7 @@ export async function getOrderList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetOrderListResponse }>( return request<API.Response & { data?: API.GetOrderListResponse }>(
"/api/v1/admin/order/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/order/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -40,12 +42,15 @@ export async function updateOrderStatus(
body: API.UpdateOrderStatusRequest, body: API.UpdateOrderStatusRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/order/status", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/order/status`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -8,7 +7,7 @@ export async function updatePaymentMethod(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.PaymentConfig }>( return request<API.Response & { data?: API.PaymentConfig }>(
"/api/v1/admin/payment/", `${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -26,7 +25,7 @@ export async function createPaymentMethod(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.PaymentConfig }>( return request<API.Response & { data?: API.PaymentConfig }>(
"/api/v1/admin/payment/", `${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -43,14 +42,17 @@ export async function deletePaymentMethod(
body: API.DeletePaymentMethodRequest, body: API.DeletePaymentMethodRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/payment/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get Payment Method List GET /v1/admin/payment/list */ /** Get Payment Method List GET /v1/admin/payment/list */
@ -60,7 +62,7 @@ export async function getPaymentMethodList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetPaymentMethodListResponse }>( return request<API.Response & { data?: API.GetPaymentMethodListResponse }>(
"/api/v1/admin/payment/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -74,7 +76,7 @@ export async function getPaymentMethodList(
/** Get supported payment platform GET /v1/admin/payment/platform */ /** Get supported payment platform GET /v1/admin/payment/platform */
export async function getPaymentPlatform(options?: { [key: string]: any }) { export async function getPaymentPlatform(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.PlatformResponse }>( return request<API.Response & { data?: API.PlatformResponse }>(
"/api/v1/admin/payment/platform", `${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/platform`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function createServer(
body: API.CreateServerRequest, body: API.CreateServerRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/server/create", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/create`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Delete Server POST /v1/admin/server/delete */ /** Delete Server POST /v1/admin/server/delete */
@ -22,14 +24,17 @@ export async function deleteServer(
body: API.DeleteServerRequest, body: API.DeleteServerRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/server/delete", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/delete`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Filter Server List GET /v1/admin/server/list */ /** Filter Server List GET /v1/admin/server/list */
@ -39,7 +44,7 @@ export async function filterServerList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterServerListResponse }>( return request<API.Response & { data?: API.FilterServerListResponse }>(
"/api/v1/admin/server/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -53,7 +58,7 @@ export async function filterServerList(
/** Check if there is any server or node to migrate GET /v1/admin/server/migrate/has */ /** Check if there is any server or node to migrate GET /v1/admin/server/migrate/has */
export async function hasMigrateSeverNode(options?: { [key: string]: any }) { export async function hasMigrateSeverNode(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.HasMigrateSeverNodeResponse }>( return request<API.Response & { data?: API.HasMigrateSeverNodeResponse }>(
"/api/v1/admin/server/migrate/has", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/migrate/has`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -64,7 +69,7 @@ export async function hasMigrateSeverNode(options?: { [key: string]: any }) {
/** Migrate server and node data to new database POST /v1/admin/server/migrate/run */ /** Migrate server and node data to new database POST /v1/admin/server/migrate/run */
export async function migrateServerNode(options?: { [key: string]: any }) { export async function migrateServerNode(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.MigrateServerNodeResponse }>( return request<API.Response & { data?: API.MigrateServerNodeResponse }>(
"/api/v1/admin/server/migrate/run", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/migrate/run`,
{ {
method: "POST", method: "POST",
...(options || {}), ...(options || {}),
@ -78,7 +83,7 @@ export async function createNode(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/server/node/create", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/create`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -96,7 +101,7 @@ export async function deleteNode(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/server/node/delete", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/delete`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -115,7 +120,7 @@ export async function filterNodeList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.FilterNodeListResponse }>( return request<API.Response & { data?: API.FilterNodeListResponse }>(
"/api/v1/admin/server/node/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -132,7 +137,7 @@ export async function resetSortWithNode(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/server/node/sort", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/sort`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -150,7 +155,7 @@ export async function toggleNodeStatus(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/server/node/status/toggle", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/status/toggle`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -165,7 +170,7 @@ export async function toggleNodeStatus(
/** Query all node tags GET /v1/admin/server/node/tags */ /** Query all node tags GET /v1/admin/server/node/tags */
export async function queryNodeTag(options?: { [key: string]: any }) { export async function queryNodeTag(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.QueryNodeTagResponse }>( return request<API.Response & { data?: API.QueryNodeTagResponse }>(
"/api/v1/admin/server/node/tags", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/tags`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -179,7 +184,7 @@ export async function updateNode(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/server/node/update", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/update`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -198,7 +203,7 @@ export async function getServerProtocols(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetServerProtocolsResponse }>( return request<API.Response & { data?: API.GetServerProtocolsResponse }>(
"/api/v1/admin/server/protocols", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/protocols`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -215,7 +220,7 @@ export async function resetSortWithServer(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/server/server/sort", `${import.meta.env.VITE_API_PREFIX}/v1/admin/server/server/sort`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -232,12 +237,15 @@ export async function updateServer(
body: API.UpdateServerRequest, body: API.UpdateServerRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/server/update", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/update`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function updateSubscribe(
body: API.UpdateSubscribeRequest, body: API.UpdateSubscribeRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/subscribe/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Create subscribe POST /v1/admin/subscribe/ */ /** Create subscribe POST /v1/admin/subscribe/ */
@ -22,14 +24,17 @@ export async function createSubscribe(
body: API.CreateSubscribeRequest, body: API.CreateSubscribeRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/subscribe/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Delete subscribe DELETE /v1/admin/subscribe/ */ /** Delete subscribe DELETE /v1/admin/subscribe/ */
@ -37,14 +42,17 @@ export async function deleteSubscribe(
body: API.DeleteSubscribeRequest, body: API.DeleteSubscribeRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/subscribe/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Batch delete subscribe DELETE /v1/admin/subscribe/batch */ /** Batch delete subscribe DELETE /v1/admin/subscribe/batch */
@ -53,7 +61,7 @@ export async function batchDeleteSubscribe(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/subscribe/batch", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/batch`,
{ {
method: "DELETE", method: "DELETE",
headers: { headers: {
@ -72,7 +80,7 @@ export async function getSubscribeDetails(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.Subscribe }>( return request<API.Response & { data?: API.Subscribe }>(
"/api/v1/admin/subscribe/details", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/details`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -89,7 +97,7 @@ export async function updateSubscribeGroup(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/subscribe/group", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -107,7 +115,7 @@ export async function createSubscribeGroup(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/subscribe/group", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -125,7 +133,7 @@ export async function deleteSubscribeGroup(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/subscribe/group", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group`,
{ {
method: "DELETE", method: "DELETE",
headers: { headers: {
@ -143,7 +151,7 @@ export async function batchDeleteSubscribeGroup(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/subscribe/group/batch", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group/batch`,
{ {
method: "DELETE", method: "DELETE",
headers: { headers: {
@ -158,7 +166,7 @@ export async function batchDeleteSubscribeGroup(
/** Get subscribe group list GET /v1/admin/subscribe/group/list */ /** Get subscribe group list GET /v1/admin/subscribe/group/list */
export async function getSubscribeGroupList(options?: { [key: string]: any }) { export async function getSubscribeGroupList(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetSubscribeGroupListResponse }>( return request<API.Response & { data?: API.GetSubscribeGroupListResponse }>(
"/api/v1/admin/subscribe/group/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group/list`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -173,7 +181,7 @@ export async function getSubscribeList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetSubscribeListResponse }>( return request<API.Response & { data?: API.GetSubscribeListResponse }>(
"/api/v1/admin/subscribe/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -187,7 +195,7 @@ export async function getSubscribeList(
/** Reset all subscribe tokens POST /v1/admin/subscribe/reset_all_token */ /** Reset all subscribe tokens POST /v1/admin/subscribe/reset_all_token */
export async function resetAllSubscribeToken(options?: { [key: string]: any }) { export async function resetAllSubscribeToken(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.ResetAllSubscribeTokenResponse }>( return request<API.Response & { data?: API.ResetAllSubscribeTokenResponse }>(
"/api/v1/admin/subscribe/reset_all_token", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/reset_all_token`,
{ {
method: "POST", method: "POST",
...(options || {}), ...(options || {}),
@ -201,7 +209,7 @@ export async function subscribeSort(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/subscribe/sort", `${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/sort`,
{ {
method: "POST", method: "POST",
headers: { headers: {

View File

@ -1,11 +1,10 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
/** Get Currency Config GET /v1/admin/system/currency_config */ /** Get Currency Config GET /v1/admin/system/currency_config */
export async function getCurrencyConfig(options?: { [key: string]: any }) { export async function getCurrencyConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.CurrencyConfig }>( return request<API.Response & { data?: API.CurrencyConfig }>(
"/api/v1/admin/system/currency_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/currency_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -19,7 +18,7 @@ export async function updateCurrencyConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/currency_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/currency_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -34,7 +33,7 @@ export async function updateCurrencyConfig(
/** Get Node Multiplier GET /v1/admin/system/get_node_multiplier */ /** Get Node Multiplier GET /v1/admin/system/get_node_multiplier */
export async function getNodeMultiplier(options?: { [key: string]: any }) { export async function getNodeMultiplier(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetNodeMultiplierResponse }>( return request<API.Response & { data?: API.GetNodeMultiplierResponse }>(
"/api/v1/admin/system/get_node_multiplier", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/get_node_multiplier`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -45,7 +44,7 @@ export async function getNodeMultiplier(options?: { [key: string]: any }) {
/** Get invite config GET /v1/admin/system/invite_config */ /** Get invite config GET /v1/admin/system/invite_config */
export async function getInviteConfig(options?: { [key: string]: any }) { export async function getInviteConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.InviteConfig }>( return request<API.Response & { data?: API.InviteConfig }>(
"/api/v1/admin/system/invite_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/invite_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -59,7 +58,7 @@ export async function updateInviteConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/invite_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/invite_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -74,7 +73,7 @@ export async function updateInviteConfig(
/** Get Module Config GET /v1/admin/system/module */ /** Get Module Config GET /v1/admin/system/module */
export async function getModuleConfig(options?: { [key: string]: any }) { export async function getModuleConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.ModuleConfig }>( return request<API.Response & { data?: API.ModuleConfig }>(
"/api/v1/admin/system/module", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/module`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -85,7 +84,7 @@ export async function getModuleConfig(options?: { [key: string]: any }) {
/** Get node config GET /v1/admin/system/node_config */ /** Get node config GET /v1/admin/system/node_config */
export async function getNodeConfig(options?: { [key: string]: any }) { export async function getNodeConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.NodeConfig }>( return request<API.Response & { data?: API.NodeConfig }>(
"/api/v1/admin/system/node_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/node_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -99,7 +98,7 @@ export async function updateNodeConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/node_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/node_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -114,7 +113,9 @@ export async function updateNodeConfig(
/** PreView Node Multiplier GET /v1/admin/system/node_multiplier/preview */ /** PreView Node Multiplier GET /v1/admin/system/node_multiplier/preview */
export async function preViewNodeMultiplier(options?: { [key: string]: any }) { export async function preViewNodeMultiplier(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.PreViewNodeMultiplierResponse }>( return request<API.Response & { data?: API.PreViewNodeMultiplierResponse }>(
"/api/v1/admin/system/node_multiplier/preview", `${
import.meta.env.VITE_API_PREFIX
}/v1/admin/system/node_multiplier/preview`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -125,7 +126,7 @@ export async function preViewNodeMultiplier(options?: { [key: string]: any }) {
/** get Privacy Policy Config GET /v1/admin/system/privacy */ /** get Privacy Policy Config GET /v1/admin/system/privacy */
export async function getPrivacyPolicyConfig(options?: { [key: string]: any }) { export async function getPrivacyPolicyConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.PrivacyPolicyConfig }>( return request<API.Response & { data?: API.PrivacyPolicyConfig }>(
"/api/v1/admin/system/privacy", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/privacy`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -139,7 +140,7 @@ export async function updatePrivacyPolicyConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/privacy", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/privacy`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -154,7 +155,7 @@ export async function updatePrivacyPolicyConfig(
/** Get register config GET /v1/admin/system/register_config */ /** Get register config GET /v1/admin/system/register_config */
export async function getRegisterConfig(options?: { [key: string]: any }) { export async function getRegisterConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.RegisterConfig }>( return request<API.Response & { data?: API.RegisterConfig }>(
"/api/v1/admin/system/register_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/register_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -168,7 +169,7 @@ export async function updateRegisterConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/register_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/register_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -186,7 +187,7 @@ export async function setNodeMultiplier(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/set_node_multiplier", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/set_node_multiplier`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -201,7 +202,7 @@ export async function setNodeMultiplier(
/** setting telegram bot POST /v1/admin/system/setting_telegram_bot */ /** setting telegram bot POST /v1/admin/system/setting_telegram_bot */
export async function settingTelegramBot(options?: { [key: string]: any }) { export async function settingTelegramBot(options?: { [key: string]: any }) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/setting_telegram_bot", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/setting_telegram_bot`,
{ {
method: "POST", method: "POST",
...(options || {}), ...(options || {}),
@ -212,7 +213,7 @@ export async function settingTelegramBot(options?: { [key: string]: any }) {
/** Get site config GET /v1/admin/system/site_config */ /** Get site config GET /v1/admin/system/site_config */
export async function getSiteConfig(options?: { [key: string]: any }) { export async function getSiteConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.SiteConfig }>( return request<API.Response & { data?: API.SiteConfig }>(
"/api/v1/admin/system/site_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/site_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -226,7 +227,7 @@ export async function updateSiteConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/site_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/site_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -241,7 +242,7 @@ export async function updateSiteConfig(
/** Get subscribe config GET /v1/admin/system/subscribe_config */ /** Get subscribe config GET /v1/admin/system/subscribe_config */
export async function getSubscribeConfig(options?: { [key: string]: any }) { export async function getSubscribeConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.SubscribeConfig }>( return request<API.Response & { data?: API.SubscribeConfig }>(
"/api/v1/admin/system/subscribe_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/subscribe_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -255,7 +256,7 @@ export async function updateSubscribeConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/subscribe_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/subscribe_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -270,7 +271,7 @@ export async function updateSubscribeConfig(
/** Get Team of Service Config GET /v1/admin/system/tos_config */ /** Get Team of Service Config GET /v1/admin/system/tos_config */
export async function getTosConfig(options?: { [key: string]: any }) { export async function getTosConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.TosConfig }>( return request<API.Response & { data?: API.TosConfig }>(
"/api/v1/admin/system/tos_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/tos_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -284,7 +285,7 @@ export async function updateTosConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/tos_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/tos_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -299,7 +300,7 @@ export async function updateTosConfig(
/** Get Verify Code Config GET /v1/admin/system/verify_code_config */ /** Get Verify Code Config GET /v1/admin/system/verify_code_config */
export async function getVerifyCodeConfig(options?: { [key: string]: any }) { export async function getVerifyCodeConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.VerifyCodeConfig }>( return request<API.Response & { data?: API.VerifyCodeConfig }>(
"/api/v1/admin/system/verify_code_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/verify_code_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -313,7 +314,7 @@ export async function updateVerifyCodeConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/verify_code_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/verify_code_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -328,7 +329,7 @@ export async function updateVerifyCodeConfig(
/** Get verify config GET /v1/admin/system/verify_config */ /** Get verify config GET /v1/admin/system/verify_config */
export async function getVerifyConfig(options?: { [key: string]: any }) { export async function getVerifyConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.VerifyConfig }>( return request<API.Response & { data?: API.VerifyConfig }>(
"/api/v1/admin/system/verify_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/verify_config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -342,7 +343,7 @@ export async function updateVerifyConfig(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/system/verify_config", `${import.meta.env.VITE_API_PREFIX}/v1/admin/system/verify_config`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function updateTicketStatus(
body: API.UpdateTicketStatusRequest, body: API.UpdateTicketStatusRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/ticket/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ticket/`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get ticket detail GET /v1/admin/ticket/detail */ /** Get ticket detail GET /v1/admin/ticket/detail */
@ -24,7 +26,7 @@ export async function getTicket(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.Ticket }>( return request<API.Response & { data?: API.Ticket }>(
"/api/v1/admin/ticket/detail", `${import.meta.env.VITE_API_PREFIX}/v1/admin/ticket/detail`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -40,14 +42,17 @@ export async function createTicketFollow(
body: API.CreateTicketFollowRequest, body: API.CreateTicketFollowRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/ticket/follow", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ticket/follow`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get ticket list GET /v1/admin/ticket/list */ /** Get ticket list GET /v1/admin/ticket/list */
@ -57,7 +62,7 @@ export async function getTicketList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetTicketListResponse }>( return request<API.Response & { data?: API.GetTicketListResponse }>(
"/api/v1/admin/ticket/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/ticket/list`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -9,7 +8,7 @@ export async function queryIpLocation(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QueryIPLocationResponse }>( return request<API.Response & { data?: API.QueryIPLocationResponse }>(
"/api/v1/admin/tool/ip/location", `${import.meta.env.VITE_API_PREFIX}/v1/admin/tool/ip/location`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -23,7 +22,7 @@ export async function queryIpLocation(
/** Get System Log GET /v1/admin/tool/log */ /** Get System Log GET /v1/admin/tool/log */
export async function getSystemLog(options?: { [key: string]: any }) { export async function getSystemLog(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.LogResponse }>( return request<API.Response & { data?: API.LogResponse }>(
"/api/v1/admin/tool/log", `${import.meta.env.VITE_API_PREFIX}/v1/admin/tool/log`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -33,16 +32,19 @@ export async function getSystemLog(options?: { [key: string]: any }) {
/** Restart System GET /v1/admin/tool/restart */ /** Restart System GET /v1/admin/tool/restart */
export async function restartSystem(options?: { [key: string]: any }) { export async function restartSystem(options?: { [key: string]: any }) {
return request<API.Response & { data?: any }>("/api/v1/admin/tool/restart", { return request<API.Response & { data?: any }>(
method: "GET", `${import.meta.env.VITE_API_PREFIX}/v1/admin/tool/restart`,
...(options || {}), {
}); method: "GET",
} ...(options || {}),
}
/** Get Version GET /v1/admin/tool/version */ );
export async function getVersion(options?: { [key: string]: any }) { }
return request<API.Response & { data?: API.VersionResponse }>(
"/api/v1/admin/tool/version", /** Get Version GET /v1/admin/tool/version */
export async function getVersion(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.VersionResponse }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/tool/version`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function createUser(
body: API.CreateUserRequest, body: API.CreateUserRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/user/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Delete user DELETE /v1/admin/user/ */ /** Delete user DELETE /v1/admin/user/ */
@ -23,19 +25,22 @@ export async function deleteUser(
params: API.DeleteUserParams, params: API.DeleteUserParams,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/user/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/`,
{
method: "DELETE", method: "DELETE",
params: { params: {
...params, ...params,
}, },
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get user auth method GET /v1/admin/user/auth_method */ /** Get user auth method GET /v1/admin/user/auth_method */
export async function getUserAuthMethod(options?: { [key: string]: any }) { export async function getUserAuthMethod(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetUserAuthMethodResponse }>( return request<API.Response & { data?: API.GetUserAuthMethodResponse }>(
"/api/v1/admin/user/auth_method", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/auth_method`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -49,7 +54,7 @@ export async function updateUserAuthMethod(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/user/auth_method", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/auth_method`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -67,7 +72,7 @@ export async function createUserAuthMethod(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/user/auth_method", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/auth_method`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -85,7 +90,7 @@ export async function deleteUserAuthMethod(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/user/auth_method", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/auth_method`,
{ {
method: "DELETE", method: "DELETE",
headers: { headers: {
@ -102,14 +107,17 @@ export async function updateUserBasicInfo(
body: API.UpdateUserBasiceInfoRequest, body: API.UpdateUserBasiceInfoRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/user/basic", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/basic`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Batch delete user DELETE /v1/admin/user/batch */ /** Batch delete user DELETE /v1/admin/user/batch */
@ -117,20 +125,23 @@ export async function batchDeleteUser(
body: API.BatchDeleteUserRequest, body: API.BatchDeleteUserRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/user/batch", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/batch`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Current user GET /v1/admin/user/current */ /** Current user GET /v1/admin/user/current */
export async function currentUser(options?: { [key: string]: any }) { export async function currentUser(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.User }>( return request<API.Response & { data?: API.User }>(
"/api/v1/admin/user/current", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/current`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -145,7 +156,7 @@ export async function getUserDetail(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.User }>( return request<API.Response & { data?: API.User }>(
"/api/v1/admin/user/detail", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/detail`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -161,14 +172,17 @@ export async function updateUserDevice(
body: API.UserDevice, body: API.UserDevice,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/user/device", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/device`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Delete user device DELETE /v1/admin/user/device */ /** Delete user device DELETE /v1/admin/user/device */
@ -176,14 +190,17 @@ export async function deleteUserDevice(
body: API.DeleteUserDeivceRequest, body: API.DeleteUserDeivceRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/user/device", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/device`,
{
method: "DELETE", method: "DELETE",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** kick offline user device PUT /v1/admin/user/device/kick_offline */ /** kick offline user device PUT /v1/admin/user/device/kick_offline */
@ -192,7 +209,7 @@ export async function kickOfflineByUserDevice(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/user/device/kick_offline", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/device/kick_offline`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -211,7 +228,7 @@ export async function getUserList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetUserListResponse }>( return request<API.Response & { data?: API.GetUserListResponse }>(
"/api/v1/admin/user/list", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -229,7 +246,7 @@ export async function getUserLoginLogs(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetUserLoginLogsResponse }>( return request<API.Response & { data?: API.GetUserLoginLogsResponse }>(
"/api/v1/admin/user/login/logs", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/login/logs`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -245,14 +262,17 @@ export async function updateUserNotifySetting(
body: API.UpdateUserNotifySettingRequest, body: API.UpdateUserNotifySettingRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/admin/user/notify", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/notify`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get user subcribe GET /v1/admin/user/subscribe */ /** Get user subcribe GET /v1/admin/user/subscribe */
@ -262,7 +282,7 @@ export async function getUserSubscribe(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetUserSubscribeListResponse }>( return request<API.Response & { data?: API.GetUserSubscribeListResponse }>(
"/api/v1/admin/user/subscribe", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -279,7 +299,7 @@ export async function updateUserSubscribe(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/user/subscribe", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -297,7 +317,7 @@ export async function createUserSubscribe(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/user/subscribe", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -315,7 +335,7 @@ export async function deleteUserSubscribe(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/admin/user/subscribe", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe`,
{ {
method: "DELETE", method: "DELETE",
headers: { headers: {
@ -334,7 +354,7 @@ export async function getUserSubscribeById(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.UserSubscribeDetail }>( return request<API.Response & { data?: API.UserSubscribeDetail }>(
"/api/v1/admin/user/subscribe/detail", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/detail`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -352,7 +372,7 @@ export async function getUserSubscribeDevices(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetUserSubscribeDevicesResponse }>( return request<API.Response & { data?: API.GetUserSubscribeDevicesResponse }>(
"/api/v1/admin/user/subscribe/device", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/device`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -370,7 +390,7 @@ export async function getUserSubscribeLogs(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetUserSubscribeLogsResponse }>( return request<API.Response & { data?: API.GetUserSubscribeLogsResponse }>(
"/api/v1/admin/user/subscribe/logs", `${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/logs`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -389,7 +409,7 @@ export async function getUserSubscribeResetTrafficLogs(
) { ) {
return request< return request<
API.Response & { data?: API.GetUserSubscribeResetTrafficLogsResponse } API.Response & { data?: API.GetUserSubscribeResetTrafficLogsResponse }
>("/api/v1/admin/user/subscribe/reset/logs", { >(`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/reset/logs`, {
method: "GET", method: "GET",
params: { params: {
...params, ...params,
@ -406,7 +426,7 @@ export async function getUserSubscribeTrafficLogs(
) { ) {
return request< return request<
API.Response & { data?: API.GetUserSubscribeTrafficLogsResponse } API.Response & { data?: API.GetUserSubscribeTrafficLogsResponse }
>("/api/v1/admin/user/subscribe/traffic_logs", { >(`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/traffic_logs`, {
method: "GET", method: "GET",
params: { params: {
...params, ...params,

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -9,7 +8,7 @@ export async function checkUser(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.CheckUserResponse }>( return request<API.Response & { data?: API.CheckUserResponse }>(
"/api/v1/auth/check", `${import.meta.env.VITE_API_PREFIX}/v1/auth/check`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -27,7 +26,7 @@ export async function checkUserTelephone(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.TelephoneCheckUserResponse }>( return request<API.Response & { data?: API.TelephoneCheckUserResponse }>(
"/api/v1/auth/check/telephone", `${import.meta.env.VITE_API_PREFIX}/v1/auth/check/telephone`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -44,7 +43,7 @@ export async function userLogin(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.LoginResponse }>( return request<API.Response & { data?: API.LoginResponse }>(
"/api/v1/auth/login", `${import.meta.env.VITE_API_PREFIX}/v1/auth/login`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -62,7 +61,7 @@ export async function deviceLogin(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.LoginResponse }>( return request<API.Response & { data?: API.LoginResponse }>(
"/api/v1/auth/login/device", `${import.meta.env.VITE_API_PREFIX}/v1/auth/login/device`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -80,7 +79,7 @@ export async function telephoneLogin(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.LoginResponse }>( return request<API.Response & { data?: API.LoginResponse }>(
"/api/v1/auth/login/telephone", `${import.meta.env.VITE_API_PREFIX}/v1/auth/login/telephone`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -98,7 +97,7 @@ export async function userRegister(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.LoginResponse }>( return request<API.Response & { data?: API.LoginResponse }>(
"/api/v1/auth/register", `${import.meta.env.VITE_API_PREFIX}/v1/auth/register`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -116,7 +115,7 @@ export async function telephoneUserRegister(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.LoginResponse }>( return request<API.Response & { data?: API.LoginResponse }>(
"/api/v1/auth/register/telephone", `${import.meta.env.VITE_API_PREFIX}/v1/auth/register/telephone`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -134,7 +133,7 @@ export async function resetPassword(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.LoginResponse }>( return request<API.Response & { data?: API.LoginResponse }>(
"/api/v1/auth/reset", `${import.meta.env.VITE_API_PREFIX}/v1/auth/reset`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -152,7 +151,7 @@ export async function telephoneResetPassword(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.LoginResponse }>( return request<API.Response & { data?: API.LoginResponse }>(
"/api/v1/auth/reset/telephone", `${import.meta.env.VITE_API_PREFIX}/v1/auth/reset/telephone`,
{ {
method: "POST", method: "POST",
headers: { headers: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -9,7 +8,7 @@ export async function getAds(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetAdsResponse }>( return request<API.Response & { data?: API.GetAdsResponse }>(
"/api/v1/common/ads", `${import.meta.env.VITE_API_PREFIX}/v1/common/ads`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -26,7 +25,7 @@ export async function checkVerificationCode(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.CheckVerificationCodeRespone }>( return request<API.Response & { data?: API.CheckVerificationCodeRespone }>(
"/api/v1/common/check_verification_code", `${import.meta.env.VITE_API_PREFIX}/v1/common/check_verification_code`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -41,7 +40,7 @@ export async function checkVerificationCode(
/** Get Client GET /v1/common/client */ /** Get Client GET /v1/common/client */
export async function getClient(options?: { [key: string]: any }) { export async function getClient(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetSubscribeClientResponse }>( return request<API.Response & { data?: API.GetSubscribeClientResponse }>(
"/api/v1/common/client", `${import.meta.env.VITE_API_PREFIX}/v1/common/client`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -52,7 +51,7 @@ export async function getClient(options?: { [key: string]: any }) {
/** 此处后端没有提供注释 GET /v1/common/heartbeat */ /** 此处后端没有提供注释 GET /v1/common/heartbeat */
export async function heartbeat(options?: { [key: string]: any }) { export async function heartbeat(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.HeartbeatResponse }>( return request<API.Response & { data?: API.HeartbeatResponse }>(
"/api/v1/common/heartbeat", `${import.meta.env.VITE_API_PREFIX}/v1/common/heartbeat`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -66,7 +65,7 @@ export async function sendEmailCode(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.SendCodeResponse }>( return request<API.Response & { data?: API.SendCodeResponse }>(
"/api/v1/common/send_code", `${import.meta.env.VITE_API_PREFIX}/v1/common/send_code`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -84,7 +83,7 @@ export async function sendSmsCode(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.SendCodeResponse }>( return request<API.Response & { data?: API.SendCodeResponse }>(
"/api/v1/common/send_sms_code", `${import.meta.env.VITE_API_PREFIX}/v1/common/send_sms_code`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -99,7 +98,7 @@ export async function sendSmsCode(
/** Get global config GET /v1/common/site/config */ /** Get global config GET /v1/common/site/config */
export async function getGlobalConfig(options?: { [key: string]: any }) { export async function getGlobalConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetGlobalConfigResponse }>( return request<API.Response & { data?: API.GetGlobalConfigResponse }>(
"/api/v1/common/site/config", `${import.meta.env.VITE_API_PREFIX}/v1/common/site/config`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -110,7 +109,7 @@ export async function getGlobalConfig(options?: { [key: string]: any }) {
/** Get Privacy Policy GET /v1/common/site/privacy */ /** Get Privacy Policy GET /v1/common/site/privacy */
export async function getPrivacyPolicy(options?: { [key: string]: any }) { export async function getPrivacyPolicy(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.PrivacyPolicyConfig }>( return request<API.Response & { data?: API.PrivacyPolicyConfig }>(
"/api/v1/common/site/privacy", `${import.meta.env.VITE_API_PREFIX}/v1/common/site/privacy`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -121,7 +120,7 @@ export async function getPrivacyPolicy(options?: { [key: string]: any }) {
/** Get stat GET /v1/common/site/stat */ /** Get stat GET /v1/common/site/stat */
export async function getStat(options?: { [key: string]: any }) { export async function getStat(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetStatResponse }>( return request<API.Response & { data?: API.GetStatResponse }>(
"/api/v1/common/site/stat", `${import.meta.env.VITE_API_PREFIX}/v1/common/site/stat`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -132,7 +131,7 @@ export async function getStat(options?: { [key: string]: any }) {
/** Get Tos Content GET /v1/common/site/tos */ /** Get Tos Content GET /v1/common/site/tos */
export async function getTos(options?: { [key: string]: any }) { export async function getTos(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetTosResponse }>( return request<API.Response & { data?: API.GetTosResponse }>(
"/api/v1/common/site/tos", `${import.meta.env.VITE_API_PREFIX}/v1/common/site/tos`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
// API 更新时间: // API 更新时间:
// API 唯一标识: // API 唯一标识:

View File

@ -34,7 +34,7 @@ export async function appleLoginCallback(
}); });
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/auth/oauth/callback/apple", `${import.meta.env.VITE_API_PREFIX}/v1/auth/oauth/callback/apple`,
{ {
method: "POST", method: "POST",
data: formData, data: formData,
@ -49,7 +49,7 @@ export async function oAuthLogin(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.OAuthLoginResponse }>( return request<API.Response & { data?: API.OAuthLoginResponse }>(
"/api/v1/auth/oauth/login", `${import.meta.env.VITE_API_PREFIX}/v1/auth/oauth/login`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -67,7 +67,7 @@ export async function oAuthLoginGetToken(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.LoginResponse }>( return request<API.Response & { data?: API.LoginResponse }>(
"/api/v1/auth/oauth/login/token", `${import.meta.env.VITE_API_PREFIX}/v1/auth/oauth/login/token`,
{ {
method: "POST", method: "POST",
headers: { headers: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
// API 更新时间: // API 更新时间:
// API 唯一标识: // API 唯一标识:

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -9,7 +8,7 @@ export async function queryAnnouncement(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QueryAnnouncementResponse }>( return request<API.Response & { data?: API.QueryAnnouncementResponse }>(
"/api/v1/public/announcement/list", `${import.meta.env.VITE_API_PREFIX}/v1/public/announcement/list`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -9,7 +8,7 @@ export async function queryDocumentDetail(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.Document }>( return request<API.Response & { data?: API.Document }>(
"/api/v1/public/document/detail", `${import.meta.env.VITE_API_PREFIX}/v1/public/document/detail`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -23,7 +22,7 @@ export async function queryDocumentDetail(
/** Get document list GET /v1/public/document/list */ /** Get document list GET /v1/public/document/list */
export async function queryDocumentList(options?: { [key: string]: any }) { export async function queryDocumentList(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.QueryDocumentListResponse }>( return request<API.Response & { data?: API.QueryDocumentListResponse }>(
"/api/v1/public/document/list", `${import.meta.env.VITE_API_PREFIX}/v1/public/document/list`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
// API 更新时间: // API 更新时间:
// API 唯一标识: // API 唯一标识:

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function closeOrder(
body: API.CloseOrderRequest, body: API.CloseOrderRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/public/order/close", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/close`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get order GET /v1/public/order/detail */ /** Get order GET /v1/public/order/detail */
@ -24,7 +26,7 @@ export async function queryOrderDetail(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.OrderDetail }>( return request<API.Response & { data?: API.OrderDetail }>(
"/api/v1/public/order/detail", `${import.meta.env.VITE_API_PREFIX}/v1/public/order/detail`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -42,7 +44,7 @@ export async function queryOrderList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QueryOrderListResponse }>( return request<API.Response & { data?: API.QueryOrderListResponse }>(
"/api/v1/public/order/list", `${import.meta.env.VITE_API_PREFIX}/v1/public/order/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -59,7 +61,7 @@ export async function preCreateOrder(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.PreOrderResponse }>( return request<API.Response & { data?: API.PreOrderResponse }>(
"/api/v1/public/order/pre", `${import.meta.env.VITE_API_PREFIX}/v1/public/order/pre`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -77,7 +79,7 @@ export async function purchase(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.PurchaseOrderResponse }>( return request<API.Response & { data?: API.PurchaseOrderResponse }>(
"/api/v1/public/order/purchase", `${import.meta.env.VITE_API_PREFIX}/v1/public/order/purchase`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -95,7 +97,7 @@ export async function recharge(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.RechargeOrderResponse }>( return request<API.Response & { data?: API.RechargeOrderResponse }>(
"/api/v1/public/order/recharge", `${import.meta.env.VITE_API_PREFIX}/v1/public/order/recharge`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -113,7 +115,7 @@ export async function renewal(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.RenewalOrderResponse }>( return request<API.Response & { data?: API.RenewalOrderResponse }>(
"/api/v1/public/order/renewal", `${import.meta.env.VITE_API_PREFIX}/v1/public/order/renewal`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -131,7 +133,7 @@ export async function resetTraffic(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.ResetTrafficOrderResponse }>( return request<API.Response & { data?: API.ResetTrafficOrderResponse }>(
"/api/v1/public/order/reset", `${import.meta.env.VITE_API_PREFIX}/v1/public/order/reset`,
{ {
method: "POST", method: "POST",
headers: { headers: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -8,7 +7,7 @@ export async function getAvailablePaymentMethods(options?: {
}) { }) {
return request< return request<
API.Response & { data?: API.GetAvailablePaymentMethodsResponse } API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
>("/api/v1/public/payment/methods", { >(`${import.meta.env.VITE_API_PREFIX}/v1/public/payment/methods`, {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
}); });

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -8,7 +7,7 @@ export async function purchaseCheckout(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.CheckoutOrderResponse }>( return request<API.Response & { data?: API.CheckoutOrderResponse }>(
"/api/v1/public/portal/order/checkout", `${import.meta.env.VITE_API_PREFIX}/v1/public/portal/order/checkout`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -27,7 +26,7 @@ export async function queryPurchaseOrder(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QueryPurchaseOrderResponse }>( return request<API.Response & { data?: API.QueryPurchaseOrderResponse }>(
"/api/v1/public/portal/order/status", `${import.meta.env.VITE_API_PREFIX}/v1/public/portal/order/status`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -44,7 +43,7 @@ export async function getAvailablePaymentMethods(options?: {
}) { }) {
return request< return request<
API.Response & { data?: API.GetAvailablePaymentMethodsResponse } API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
>("/api/v1/public/portal/payment-method", { >(`${import.meta.env.VITE_API_PREFIX}/v1/public/portal/payment-method`, {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
}); });
@ -56,7 +55,7 @@ export async function prePurchaseOrder(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.PrePurchaseOrderResponse }>( return request<API.Response & { data?: API.PrePurchaseOrderResponse }>(
"/api/v1/public/portal/pre", `${import.meta.env.VITE_API_PREFIX}/v1/public/portal/pre`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -74,7 +73,7 @@ export async function purchase(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.PortalPurchaseResponse }>( return request<API.Response & { data?: API.PortalPurchaseResponse }>(
"/api/v1/public/portal/purchase", `${import.meta.env.VITE_API_PREFIX}/v1/public/portal/purchase`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -93,7 +92,7 @@ export async function getSubscription(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetSubscriptionResponse }>( return request<API.Response & { data?: API.GetSubscriptionResponse }>(
"/api/v1/public/portal/subscribe", `${import.meta.env.VITE_API_PREFIX}/v1/public/portal/subscribe`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -9,7 +8,7 @@ export async function querySubscribeList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QuerySubscribeListResponse }>( return request<API.Response & { data?: API.QuerySubscribeListResponse }>(
"/api/v1/public/subscribe/list", `${import.meta.env.VITE_API_PREFIX}/v1/public/subscribe/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -26,7 +25,7 @@ export async function queryUserSubscribeNodeList(options?: {
}) { }) {
return request< return request<
API.Response & { data?: API.QueryUserSubscribeNodeListResponse } API.Response & { data?: API.QueryUserSubscribeNodeListResponse }
>("/api/v1/public/subscribe/node/list", { >(`${import.meta.env.VITE_API_PREFIX}/v1/public/subscribe/node/list`, {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
}); });

View File

@ -1,4 +1,3 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
@ -7,14 +6,17 @@ export async function updateUserTicketStatus(
body: API.UpdateUserTicketStatusRequest, body: API.UpdateUserTicketStatusRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/public/ticket/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Create ticket POST /v1/public/ticket/ */ /** Create ticket POST /v1/public/ticket/ */
@ -22,14 +24,17 @@ export async function createUserTicket(
body: API.CreateUserTicketRequest, body: API.CreateUserTicketRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/public/ticket/", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/`,
{
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get ticket detail GET /v1/public/ticket/detail */ /** Get ticket detail GET /v1/public/ticket/detail */
@ -39,7 +44,7 @@ export async function getUserTicketDetails(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.Ticket }>( return request<API.Response & { data?: API.Ticket }>(
"/api/v1/public/ticket/detail", `${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/detail`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -56,7 +61,7 @@ export async function createUserTicketFollow(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/ticket/follow", `${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/follow`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -75,7 +80,7 @@ export async function getUserTicketList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetUserTicketListResponse }>( return request<API.Response & { data?: API.GetUserTicketListResponse }>(
"/api/v1/public/ticket/list", `${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/list`,
{ {
method: "GET", method: "GET",
params: { params: {

View File

@ -1,11 +1,10 @@
//
/* eslint-disable */ /* eslint-disable */
import request from "@workspace/ui/lib/request"; import request from "@workspace/ui/lib/request";
/** Query User Affiliate Count GET /v1/public/user/affiliate/count */ /** Query User Affiliate Count GET /v1/public/user/affiliate/count */
export async function queryUserAffiliate(options?: { [key: string]: any }) { export async function queryUserAffiliate(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.QueryUserAffiliateCountResponse }>( return request<API.Response & { data?: API.QueryUserAffiliateCountResponse }>(
"/api/v1/public/user/affiliate/count", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/affiliate/count`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -20,7 +19,7 @@ export async function queryUserAffiliateList(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QueryUserAffiliateListResponse }>( return request<API.Response & { data?: API.QueryUserAffiliateListResponse }>(
"/api/v1/public/user/affiliate/list", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/affiliate/list`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -34,7 +33,7 @@ export async function queryUserAffiliateList(
/** Query User Balance Log GET /v1/public/user/balance_log */ /** Query User Balance Log GET /v1/public/user/balance_log */
export async function queryUserBalanceLog(options?: { [key: string]: any }) { export async function queryUserBalanceLog(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.QueryUserBalanceLogListResponse }>( return request<API.Response & { data?: API.QueryUserBalanceLogListResponse }>(
"/api/v1/public/user/balance_log", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/balance_log`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -48,7 +47,7 @@ export async function updateBindEmail(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/bind_email", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_email`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -66,7 +65,7 @@ export async function updateBindMobile(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/bind_mobile", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_mobile`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -84,7 +83,7 @@ export async function bindOAuth(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.BindOAuthResponse }>( return request<API.Response & { data?: API.BindOAuthResponse }>(
"/api/v1/public/user/bind_oauth", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_oauth`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -102,7 +101,7 @@ export async function bindOAuthCallback(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/bind_oauth/callback", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_oauth/callback`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -117,7 +116,7 @@ export async function bindOAuthCallback(
/** Bind Telegram GET /v1/public/user/bind_telegram */ /** Bind Telegram GET /v1/public/user/bind_telegram */
export async function bindTelegram(options?: { [key: string]: any }) { export async function bindTelegram(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.BindTelegramResponse }>( return request<API.Response & { data?: API.BindTelegramResponse }>(
"/api/v1/public/user/bind_telegram", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_telegram`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -133,7 +132,7 @@ export async function queryUserCommissionLog(
) { ) {
return request< return request<
API.Response & { data?: API.QueryUserCommissionLogListResponse } API.Response & { data?: API.QueryUserCommissionLogListResponse }
>("/api/v1/public/user/commission_log", { >(`${import.meta.env.VITE_API_PREFIX}/v1/public/user/commission_log`, {
method: "GET", method: "GET",
params: { params: {
...params, ...params,
@ -148,7 +147,7 @@ export async function commissionWithdraw(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.WithdrawalLog }>( return request<API.Response & { data?: API.WithdrawalLog }>(
"/api/v1/public/user/commission_withdraw", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/commission_withdraw`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -163,7 +162,7 @@ export async function commissionWithdraw(
/** Get Device List GET /v1/public/user/devices */ /** Get Device List GET /v1/public/user/devices */
export async function getDeviceList(options?: { [key: string]: any }) { export async function getDeviceList(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetDeviceListResponse }>( return request<API.Response & { data?: API.GetDeviceListResponse }>(
"/api/v1/public/user/devices", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/devices`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -174,7 +173,7 @@ export async function getDeviceList(options?: { [key: string]: any }) {
/** Query User Info GET /v1/public/user/info */ /** Query User Info GET /v1/public/user/info */
export async function queryUserInfo(options?: { [key: string]: any }) { export async function queryUserInfo(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.User }>( return request<API.Response & { data?: API.User }>(
"/api/v1/public/user/info", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/info`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -189,7 +188,7 @@ export async function getLoginLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetLoginLogResponse }>( return request<API.Response & { data?: API.GetLoginLogResponse }>(
"/api/v1/public/user/login_log", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/login_log`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -205,20 +204,23 @@ export async function updateUserNotify(
body: API.UpdateUserNotifyRequest, body: API.UpdateUserNotifyRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/public/user/notify", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/notify`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Get OAuth Methods GET /v1/public/user/oauth_methods */ /** Get OAuth Methods GET /v1/public/user/oauth_methods */
export async function getOAuthMethods(options?: { [key: string]: any }) { export async function getOAuthMethods(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetOAuthMethodsResponse }>( return request<API.Response & { data?: API.GetOAuthMethodsResponse }>(
"/api/v1/public/user/oauth_methods", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/oauth_methods`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -232,7 +234,7 @@ export async function updateUserPassword(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/password", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/password`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -249,20 +251,23 @@ export async function updateUserRules(
body: API.UpdateUserRulesRequest, body: API.UpdateUserRulesRequest,
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>("/api/v1/public/user/rules", { return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/rules`,
{
method: "PUT", method: "PUT",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
data: body, data: body,
...(options || {}), ...(options || {}),
}); }
);
} }
/** Query User Subscribe GET /v1/public/user/subscribe */ /** Query User Subscribe GET /v1/public/user/subscribe */
export async function queryUserSubscribe(options?: { [key: string]: any }) { export async function queryUserSubscribe(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.QueryUserSubscribeListResponse }>( return request<API.Response & { data?: API.QueryUserSubscribeListResponse }>(
"/api/v1/public/user/subscribe", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/subscribe`,
{ {
method: "GET", method: "GET",
...(options || {}), ...(options || {}),
@ -277,7 +282,7 @@ export async function getSubscribeLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.GetSubscribeLogResponse }>( return request<API.Response & { data?: API.GetSubscribeLogResponse }>(
"/api/v1/public/user/subscribe_log", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/subscribe_log`,
{ {
method: "GET", method: "GET",
params: { params: {
@ -294,7 +299,7 @@ export async function updateUserSubscribeNote(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/subscribe_note", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/subscribe_note`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -312,7 +317,7 @@ export async function resetUserSubscribeToken(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/subscribe_token", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/subscribe_token`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -330,7 +335,7 @@ export async function unbindDevice(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/unbind_device", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/unbind_device`,
{ {
method: "PUT", method: "PUT",
headers: { headers: {
@ -348,7 +353,7 @@ export async function unbindOAuth(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/unbind_oauth", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/unbind_oauth`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -363,7 +368,7 @@ export async function unbindOAuth(
/** Unbind Telegram POST /v1/public/user/unbind_telegram */ /** Unbind Telegram POST /v1/public/user/unbind_telegram */
export async function unbindTelegram(options?: { [key: string]: any }) { export async function unbindTelegram(options?: { [key: string]: any }) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/unbind_telegram", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/unbind_telegram`,
{ {
method: "POST", method: "POST",
...(options || {}), ...(options || {}),
@ -377,7 +382,7 @@ export async function unsubscribe(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/unsubscribe", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/unsubscribe`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -395,7 +400,7 @@ export async function preUnsubscribe(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.PreUnsubscribeResponse }>( return request<API.Response & { data?: API.PreUnsubscribeResponse }>(
"/api/v1/public/user/unsubscribe/pre", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/unsubscribe/pre`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -413,7 +418,7 @@ export async function verifyEmail(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: any }>( return request<API.Response & { data?: any }>(
"/api/v1/public/user/verify_email", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/verify_email`,
{ {
method: "POST", method: "POST",
headers: { headers: {
@ -432,7 +437,7 @@ export async function queryWithdrawalLog(
options?: { [key: string]: any } options?: { [key: string]: any }
) { ) {
return request<API.Response & { data?: API.QueryWithdrawalLogListResponse }>( return request<API.Response & { data?: API.QueryWithdrawalLogListResponse }>(
"/api/v1/public/user/withdrawal_log", `${import.meta.env.VITE_API_PREFIX}/v1/public/user/withdrawal_log`,
{ {
method: "GET", method: "GET",
params: { params: {