🐛 fix: update API prefix handling to ensure compatibility with undefined VITE_API_PREFIX
This commit is contained in:
parent
6a70eab2e9
commit
3920c6ff59
@ -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: "import.meta.env.VITE_API_PREFIX",
|
apiPrefix: "import.meta.env.VITE_API_PREFIX || ''",
|
||||||
};
|
};
|
||||||
|
|
||||||
const config = [
|
const config = [
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function updateAds(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ads/`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -25,7 +25,7 @@ export async function createAds(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ads/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -43,7 +43,7 @@ export async function deleteAds(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ads/`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -62,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ads/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -80,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ads/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ads/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function updateAnnouncement(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -25,7 +25,7 @@ export async function createAnnouncement(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -43,7 +43,7 @@ export async function deleteAnnouncement(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -62,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -80,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/announcement/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/announcement/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -7,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/application/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/application/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -27,7 +27,7 @@ export async function previewSubscribeTemplate(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.PreviewSubscribeTemplateResponse }
|
API.Response & { data?: API.PreviewSubscribeTemplateResponse }
|
||||||
>(`${import.meta.env.VITE_API_PREFIX}/v1/admin/application/preview`, {
|
>(`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/application/preview`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
@ -43,7 +43,7 @@ export async function updateSubscribeApplication(
|
|||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.SubscribeApplication }>(
|
return request<API.Response & { data?: API.SubscribeApplication }>(
|
||||||
`${
|
`${
|
||||||
import.meta.env.VITE_API_PREFIX
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
}/v1/admin/application/subscribe_application`,
|
}/v1/admin/application/subscribe_application`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
@ -63,7 +63,7 @@ export async function deleteSubscribeApplication(
|
|||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${
|
`${
|
||||||
import.meta.env.VITE_API_PREFIX
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
}/v1/admin/application/subscribe_application`,
|
}/v1/admin/application/subscribe_application`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
@ -86,7 +86,7 @@ export async function getSubscribeApplicationList(
|
|||||||
API.Response & { data?: API.GetSubscribeApplicationListResponse }
|
API.Response & { data?: API.GetSubscribeApplicationListResponse }
|
||||||
>(
|
>(
|
||||||
`${
|
`${
|
||||||
import.meta.env.VITE_API_PREFIX
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
}/v1/admin/application/subscribe_application_list`,
|
}/v1/admin/application/subscribe_application_list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|||||||
@ -8,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/auth-method/config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -25,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/auth-method/config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -40,7 +40,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/email_platform`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/auth-method/email_platform`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -51,7 +53,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/auth-method/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -62,7 +64,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/auth-method/sms_platform`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/auth-method/sms_platform`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -76,7 +80,9 @@ export async function testEmailSend(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/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: {
|
||||||
@ -94,7 +100,9 @@ export async function testSmsSend(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/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: {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/console/revenue`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/console/revenue`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -15,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/console/server`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/console/server`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -26,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/console/ticket`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/console/ticket`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -37,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/console/user`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/console/user`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function updateCoupon(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/coupon/`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -25,7 +25,7 @@ export async function createCoupon(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/coupon/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -43,7 +43,7 @@ export async function deleteCoupon(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/coupon/`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -61,7 +61,7 @@ export async function batchDeleteCoupon(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/batch`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/coupon/batch`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -80,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/coupon/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/coupon/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function updateDocument(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/document/`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -25,7 +25,7 @@ export async function createDocument(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/document/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -43,7 +43,7 @@ export async function deleteDocument(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/document/`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -61,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/batch`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/document/batch`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -76,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/document/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -91,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/document/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/document/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -8,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/balance/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/balance/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -26,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/commission/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/commission/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -44,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/email/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/email/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -62,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/gift/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/gift/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -80,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/login/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/login/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -98,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/message/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/message/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -116,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/mobile/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/mobile/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -134,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/register/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/register/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -152,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/server/traffic/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/server/traffic/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -166,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/setting`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/setting`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -180,7 +180,7 @@ export async function updateLogSetting(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/setting`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/setting`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -199,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/subscribe/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/subscribe/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -217,7 +217,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/subscribe/reset/list`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/log/subscribe/reset/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -235,7 +237,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/subscribe/traffic/list`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/log/subscribe/traffic/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -253,7 +257,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/log/traffic/details`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/log/traffic/details`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -9,13 +9,18 @@ export async function getBatchSendEmailTaskList(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetBatchSendEmailTaskListResponse }
|
API.Response & { data?: API.GetBatchSendEmailTaskListResponse }
|
||||||
>(`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/email/batch/list`, {
|
>(
|
||||||
method: "GET",
|
`${
|
||||||
params: {
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
...params,
|
}/v1/admin/marketing/email/batch/list`,
|
||||||
},
|
{
|
||||||
...(options || {}),
|
method: "GET",
|
||||||
});
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get pre-send email count POST /v1/admin/marketing/email/batch/pre-send-count */
|
/** Get pre-send email count POST /v1/admin/marketing/email/batch/pre-send-count */
|
||||||
@ -25,7 +30,7 @@ export async function getPreSendEmailCount(
|
|||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.GetPreSendEmailCountResponse }>(
|
return request<API.Response & { data?: API.GetPreSendEmailCountResponse }>(
|
||||||
`${
|
`${
|
||||||
import.meta.env.VITE_API_PREFIX
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
}/v1/admin/marketing/email/batch/pre-send-count`,
|
}/v1/admin/marketing/email/batch/pre-send-count`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@ -44,7 +49,9 @@ export async function createBatchSendEmailTask(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/email/batch/send`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/marketing/email/batch/send`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -64,7 +71,9 @@ export async function getBatchSendEmailTaskStatus(
|
|||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetBatchSendEmailTaskStatusResponse }
|
API.Response & { data?: API.GetBatchSendEmailTaskStatusResponse }
|
||||||
>(
|
>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/email/batch/status`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/marketing/email/batch/status`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -82,7 +91,9 @@ export async function stopBatchSendEmailTask(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/email/batch/stop`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/marketing/email/batch/stop`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -100,7 +111,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/quota/create`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/marketing/quota/create`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -119,7 +130,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/quota/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/marketing/quota/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -136,7 +147,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/marketing/quota/pre-count`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/marketing/quota/pre-count`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function createOrder(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/order/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/order/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -26,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/order/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/order/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -43,7 +43,7 @@ export async function updateOrderStatus(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/order/status`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/order/status`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -7,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -25,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -43,7 +43,7 @@ export async function deletePaymentMethod(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -62,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -76,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/payment/platform`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/payment/platform`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function createServer(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/create`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/create`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -25,7 +25,7 @@ export async function deleteServer(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/delete`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/delete`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -44,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -58,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/migrate/has`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/migrate/has`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -69,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/migrate/run`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/migrate/run`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -83,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/create`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/create`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -101,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/delete`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/delete`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -120,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -137,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/sort`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/sort`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -155,7 +155,9 @@ export async function toggleNodeStatus(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/status/toggle`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/server/node/status/toggle`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -170,7 +172,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/tags`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/tags`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -184,7 +186,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/node/update`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/node/update`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -203,7 +205,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/protocols`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/protocols`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -220,7 +222,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/server/sort`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/server/sort`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -238,7 +240,7 @@ export async function updateServer(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/server/update`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/server/update`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function updateSubscribe(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -25,7 +25,7 @@ export async function createSubscribe(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -43,7 +43,7 @@ export async function deleteSubscribe(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -61,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/batch`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/batch`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -80,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/details`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/details`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -97,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/group`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -115,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/group`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -133,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/group`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -151,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group/batch`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/group/batch`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -166,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/group/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/group/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -181,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -195,7 +195,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/reset_all_token`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/subscribe/reset_all_token`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -209,7 +211,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/subscribe/sort`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/subscribe/sort`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/currency_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/currency_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -18,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/currency_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/currency_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -33,7 +33,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/get_node_multiplier`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/system/get_node_multiplier`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -44,7 +46,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/invite_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/invite_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -58,7 +60,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/invite_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/invite_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -73,7 +75,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/module`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/module`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -84,7 +86,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/node_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/node_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -98,7 +100,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/node_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/node_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -114,7 +116,7 @@ export async function updateNodeConfig(
|
|||||||
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 }>(
|
||||||
`${
|
`${
|
||||||
import.meta.env.VITE_API_PREFIX
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
}/v1/admin/system/node_multiplier/preview`,
|
}/v1/admin/system/node_multiplier/preview`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
@ -126,7 +128,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/privacy`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/privacy`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -140,7 +142,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/privacy`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/privacy`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -155,7 +157,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/register_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/register_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -169,7 +171,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/register_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/register_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -187,7 +189,9 @@ export async function setNodeMultiplier(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/set_node_multiplier`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/system/set_node_multiplier`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -202,7 +206,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/setting_telegram_bot`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/system/setting_telegram_bot`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -213,7 +219,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/site_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/site_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -227,7 +233,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/site_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/site_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -242,7 +248,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/subscribe_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/subscribe_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -256,7 +262,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/subscribe_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/subscribe_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -271,7 +277,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/tos_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/tos_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -285,7 +291,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/tos_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/tos_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -300,7 +306,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/verify_code_config`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/system/verify_code_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -314,7 +322,9 @@ export async function updateVerifyCodeConfig(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/verify_code_config`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/system/verify_code_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -329,7 +339,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/verify_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/verify_config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -343,7 +353,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/system/verify_config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/system/verify_config`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function updateTicketStatus(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ticket/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ticket/`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -26,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ticket/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ticket/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -43,7 +43,7 @@ export async function createTicketFollow(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ticket/follow`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ticket/follow`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -62,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/ticket/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/ticket/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -8,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/tool/ip/location`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/tool/ip/location`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -22,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/tool/log`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/tool/log`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -33,7 +33,7 @@ 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 }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/tool/restart`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/tool/restart`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -44,7 +44,7 @@ export async function restartSystem(options?: { [key: string]: any }) {
|
|||||||
/** Get Version GET /v1/admin/tool/version */
|
/** Get Version GET /v1/admin/tool/version */
|
||||||
export async function getVersion(options?: { [key: string]: any }) {
|
export async function getVersion(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.VersionResponse }>(
|
return request<API.Response & { data?: API.VersionResponse }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/tool/version`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/tool/version`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function createUser(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -26,7 +26,7 @@ export async function deleteUser(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
params: {
|
params: {
|
||||||
@ -40,7 +40,7 @@ export async function deleteUser(
|
|||||||
/** 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/auth_method`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/auth_method`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -54,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/auth_method`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/auth_method`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -72,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/auth_method`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/auth_method`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -90,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/auth_method`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/auth_method`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -108,7 +108,7 @@ export async function updateUserBasicInfo(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/basic`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/basic`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -126,7 +126,7 @@ export async function batchDeleteUser(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/batch`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/batch`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -141,7 +141,7 @@ export async function batchDeleteUser(
|
|||||||
/** 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/current`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/current`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -156,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -173,7 +173,7 @@ export async function updateUserDevice(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/device`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/device`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -191,7 +191,7 @@ export async function deleteUserDevice(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/device`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/device`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -209,7 +209,9 @@ export async function kickOfflineByUserDevice(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/device/kick_offline`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/admin/user/device/kick_offline`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -228,7 +230,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -246,7 +248,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/login/logs`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/login/logs`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -263,7 +265,7 @@ export async function updateUserNotifySetting(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/notify`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/notify`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -282,7 +284,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/subscribe`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -299,7 +301,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/subscribe`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -317,7 +319,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/subscribe`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -335,7 +337,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/subscribe`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -354,7 +356,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/subscribe/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -372,7 +374,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/device`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/subscribe/device`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -390,7 +392,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/logs`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/subscribe/logs`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -409,13 +411,18 @@ export async function getUserSubscribeResetTrafficLogs(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetUserSubscribeResetTrafficLogsResponse }
|
API.Response & { data?: API.GetUserSubscribeResetTrafficLogsResponse }
|
||||||
>(`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/reset/logs`, {
|
>(
|
||||||
method: "GET",
|
`${
|
||||||
params: {
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
...params,
|
}/v1/admin/user/subscribe/reset/logs`,
|
||||||
},
|
{
|
||||||
...(options || {}),
|
method: "GET",
|
||||||
});
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get user subcribe traffic logs GET /v1/admin/user/subscribe/traffic_logs */
|
/** Get user subcribe traffic logs GET /v1/admin/user/subscribe/traffic_logs */
|
||||||
@ -426,11 +433,16 @@ export async function getUserSubscribeTrafficLogs(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetUserSubscribeTrafficLogsResponse }
|
API.Response & { data?: API.GetUserSubscribeTrafficLogsResponse }
|
||||||
>(`${import.meta.env.VITE_API_PREFIX}/v1/admin/user/subscribe/traffic_logs`, {
|
>(
|
||||||
method: "GET",
|
`${
|
||||||
params: {
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
...params,
|
}/v1/admin/user/subscribe/traffic_logs`,
|
||||||
},
|
{
|
||||||
...(options || {}),
|
method: "GET",
|
||||||
});
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/check`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/check`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -26,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/check/telephone`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/check/telephone`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -43,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/login`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/login`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -61,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/login/device`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/login/device`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -79,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/login/telephone`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/login/telephone`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -97,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/register`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/register`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -115,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/register/telephone`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/register/telephone`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -133,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/reset`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/reset`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -151,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/reset/telephone`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/reset/telephone`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -8,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/ads`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/ads`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -25,7 +25,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/check_verification_code`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/common/check_verification_code`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -40,7 +42,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/client`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/client`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -51,7 +53,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/heartbeat`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/heartbeat`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -65,7 +67,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/send_code`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/send_code`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -83,7 +85,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/send_sms_code`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/send_sms_code`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -98,7 +100,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/site/config`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/site/config`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -109,7 +111,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/site/privacy`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/site/privacy`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -120,7 +122,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/site/stat`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/site/stat`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -131,7 +133,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/common/site/tos`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/common/site/tos`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export async function appleLoginCallback(
|
|||||||
});
|
});
|
||||||
|
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/auth/oauth/login/token`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/auth/oauth/login/token`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -8,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/announcement/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/announcement/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -8,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/document/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/document/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -22,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/document/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/document/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function closeOrder(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/close`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/order/close`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -26,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/order/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -44,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/order/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -61,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/pre`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/order/pre`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -79,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/purchase`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/order/purchase`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -97,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/recharge`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/order/recharge`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -115,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/renewal`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/order/renewal`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -133,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/order/reset`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/order/reset`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function getAvailablePaymentMethods(options?: {
|
|||||||
}) {
|
}) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
|
API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
|
||||||
>(`${import.meta.env.VITE_API_PREFIX}/v1/public/payment/methods`, {
|
>(`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/payment/methods`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -7,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/portal/order/checkout`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/portal/order/checkout`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -26,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/portal/order/status`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/portal/order/status`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -43,10 +43,13 @@ export async function getAvailablePaymentMethods(options?: {
|
|||||||
}) {
|
}) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
|
API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
|
||||||
>(`${import.meta.env.VITE_API_PREFIX}/v1/public/portal/payment-method`, {
|
>(
|
||||||
method: "GET",
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/portal/payment-method`,
|
||||||
...(options || {}),
|
{
|
||||||
});
|
method: "GET",
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Pre Purchase Order POST /v1/public/portal/pre */
|
/** Pre Purchase Order POST /v1/public/portal/pre */
|
||||||
@ -55,7 +58,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/portal/pre`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/portal/pre`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -73,7 +76,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/portal/purchase`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/portal/purchase`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -92,7 +95,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/portal/subscribe`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/portal/subscribe`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -8,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/subscribe/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/subscribe/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -25,7 +25,7 @@ export async function queryUserSubscribeNodeList(options?: {
|
|||||||
}) {
|
}) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.QueryUserSubscribeNodeListResponse }
|
API.Response & { data?: API.QueryUserSubscribeNodeListResponse }
|
||||||
>(`${import.meta.env.VITE_API_PREFIX}/v1/public/subscribe/node/list`, {
|
>(`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/subscribe/node/list`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function updateUserTicketStatus(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/ticket/`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -25,7 +25,7 @@ export async function createUserTicket(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/ticket/`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -44,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/detail`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/ticket/detail`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -61,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/follow`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/ticket/follow`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -80,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/ticket/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/ticket/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/affiliate/count`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/affiliate/count`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -19,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/affiliate/list`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/affiliate/list`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -33,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/balance_log`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/balance_log`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -47,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_email`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/bind_email`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -65,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_mobile`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/bind_mobile`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -83,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_oauth`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/bind_oauth`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -101,7 +101,9 @@ export async function bindOAuthCallback(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_oauth/callback`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/public/user/bind_oauth/callback`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -116,7 +118,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/bind_telegram`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/bind_telegram`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -132,7 +134,7 @@ export async function queryUserCommissionLog(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.QueryUserCommissionLogListResponse }
|
API.Response & { data?: API.QueryUserCommissionLogListResponse }
|
||||||
>(`${import.meta.env.VITE_API_PREFIX}/v1/public/user/commission_log`, {
|
>(`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/commission_log`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
@ -147,7 +149,9 @@ 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/commission_withdraw`,
|
`${
|
||||||
|
import.meta.env.VITE_API_PREFIX || ""
|
||||||
|
}/v1/public/user/commission_withdraw`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -162,7 +166,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/devices`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/devices`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -173,7 +177,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/info`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/info`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -188,7 +192,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/login_log`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/login_log`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -205,7 +209,7 @@ export async function updateUserNotify(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/notify`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/notify`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -220,7 +224,7 @@ export async function updateUserNotify(
|
|||||||
/** 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/oauth_methods`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/oauth_methods`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -234,7 +238,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/password`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/password`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -252,7 +256,7 @@ export async function updateUserRules(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/rules`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/rules`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -267,7 +271,7 @@ export async function updateUserRules(
|
|||||||
/** 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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/subscribe`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/subscribe`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -282,7 +286,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/subscribe_log`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/subscribe_log`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -299,7 +303,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/subscribe_note`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/subscribe_note`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -317,7 +321,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/subscribe_token`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/subscribe_token`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -335,7 +339,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/unbind_device`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/unbind_device`,
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -353,7 +357,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/unbind_oauth`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/unbind_oauth`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -368,7 +372,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/unbind_telegram`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/unbind_telegram`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -382,7 +386,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/unsubscribe`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/unsubscribe`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -400,7 +404,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/unsubscribe/pre`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/unsubscribe/pre`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -418,7 +422,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/verify_email`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/verify_email`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -437,7 +441,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 }>(
|
||||||
`${import.meta.env.VITE_API_PREFIX}/v1/public/user/withdrawal_log`,
|
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/withdrawal_log`,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user