♻️ refactor(api): update endpoints to include '/api' prefix and add new types for IP location and withdrawal logs
- Updated all user and common service endpoints to include '/api' prefix for consistency. - Added new API types for querying IP location and withdrawal logs. - Introduced commission withdrawal functionality in user service. - Enhanced user service typings to include rules and withdrawal log structures.
This commit is contained in:
parent
1837343845
commit
5f3354e948
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -2,7 +2,7 @@ name: Build and Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, next, beta]
|
branches: [main, next, beta, develop]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -25,7 +25,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/.bun
|
~/.bun
|
||||||
node_modules
|
node_modules
|
||||||
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-cache-
|
${{ runner.os }}-bun-cache-
|
||||||
|
|
||||||
|
|||||||
@ -43,11 +43,10 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
"/v1": {
|
"/api": {
|
||||||
target: "https://api.ppanel.dev",
|
target: "https://api.ppanel.dev",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false,
|
secure: false,
|
||||||
rewrite: (path) => path.replace(/^\/v1/, "/v1"),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -43,11 +43,10 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
"/v1": {
|
"/api": {
|
||||||
target: "https://api.ppanel.dev",
|
target: "https://api.ppanel.dev",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false,
|
secure: false,
|
||||||
rewrite: (path) => path.replace(/^\/v1/, "/v1"),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,23 +1,26 @@
|
|||||||
|
const baseConfig = {
|
||||||
|
requestLibPath: "import request from '@workspace/ui/lib/request';",
|
||||||
|
serversPath: "./src/services",
|
||||||
|
apiPrefix: "'/api'",
|
||||||
|
};
|
||||||
|
|
||||||
const config = [
|
const config = [
|
||||||
{
|
{
|
||||||
requestLibPath: "import request from '@workspace/ui/lib/request';",
|
...baseConfig,
|
||||||
schemaPath:
|
schemaPath:
|
||||||
"https://raw.githubusercontent.com/perfect-panel/ppanel-docs/refs/heads/main/public/swagger/common.json",
|
"https://raw.githubusercontent.com/perfect-panel/ppanel-docs/refs/heads/main/public/swagger/common.json",
|
||||||
serversPath: "./src/services",
|
|
||||||
projectName: "common",
|
projectName: "common",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
requestLibPath: "import request from '@workspace/ui/lib/request';",
|
...baseConfig,
|
||||||
schemaPath:
|
schemaPath:
|
||||||
"https://raw.githubusercontent.com/perfect-panel/ppanel-docs/refs/heads/main/public/swagger/user.json",
|
"https://raw.githubusercontent.com/perfect-panel/ppanel-docs/refs/heads/main/public/swagger/user.json",
|
||||||
serversPath: "./src/services",
|
|
||||||
projectName: "user",
|
projectName: "user",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
requestLibPath: "import request from '@workspace/ui/lib/request';",
|
...baseConfig,
|
||||||
schemaPath:
|
schemaPath:
|
||||||
"https://raw.githubusercontent.com/perfect-panel/ppanel-docs/refs/heads/main/public/swagger/admin.json",
|
"https://raw.githubusercontent.com/perfect-panel/ppanel-docs/refs/heads/main/public/swagger/admin.json",
|
||||||
serversPath: "./src/services",
|
|
||||||
projectName: "admin",
|
projectName: "admin",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function updateAds(
|
|||||||
body: API.UpdateAdsRequest,
|
body: API.UpdateAdsRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/ads/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/ads/", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -21,7 +21,7 @@ export async function createAds(
|
|||||||
body: API.CreateAdsRequest,
|
body: API.CreateAdsRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/ads/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/ads/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -36,7 +36,7 @@ export async function deleteAds(
|
|||||||
body: API.DeleteAdsRequest,
|
body: API.DeleteAdsRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/ads/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/ads/", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -52,23 +52,26 @@ export async function getAdsDetail(
|
|||||||
params: API.GetAdsDetailParams,
|
params: API.GetAdsDetailParams,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.Ads }>("/v1/admin/ads/detail", {
|
return request<API.Response & { data?: API.Ads }>(
|
||||||
method: "GET",
|
"/api/v1/admin/ads/detail",
|
||||||
params: {
|
{
|
||||||
...params,
|
method: "GET",
|
||||||
},
|
params: {
|
||||||
...(options || {}),
|
...params,
|
||||||
});
|
},
|
||||||
}
|
...(options || {}),
|
||||||
|
}
|
||||||
/** Get Ads List GET /v1/admin/ads/list */
|
);
|
||||||
export async function getAdsList(
|
}
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
||||||
params: API.GetAdsListParams,
|
/** Get Ads List GET /v1/admin/ads/list */
|
||||||
options?: { [key: string]: any }
|
export async function getAdsList(
|
||||||
) {
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
return request<API.Response & { data?: API.GetAdsListResponse }>(
|
params: API.GetAdsListParams,
|
||||||
"/v1/admin/ads/list",
|
options?: { [key: string]: any }
|
||||||
|
) {
|
||||||
|
return request<API.Response & { data?: API.GetAdsListResponse }>(
|
||||||
|
"/api/v1/admin/ads/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function updateAnnouncement(
|
|||||||
body: API.UpdateAnnouncementRequest,
|
body: API.UpdateAnnouncementRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/announcement/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -21,7 +21,7 @@ export async function createAnnouncement(
|
|||||||
body: API.CreateAnnouncementRequest,
|
body: API.CreateAnnouncementRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/announcement/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -36,7 +36,7 @@ export async function deleteAnnouncement(
|
|||||||
body: API.DeleteAnnouncementRequest,
|
body: API.DeleteAnnouncementRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/announcement/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -53,7 +53,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 }>(
|
||||||
"/v1/admin/announcement/detail",
|
"/api/v1/admin/announcement/detail",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -71,7 +71,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 }>(
|
||||||
"/v1/admin/announcement/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/application/",
|
"/api/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 }
|
||||||
>("/v1/admin/application/preview", {
|
>("/api/v1/admin/application/preview", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
@ -42,7 +42,7 @@ export async function updateSubscribeApplication(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.SubscribeApplication }>(
|
return request<API.Response & { data?: API.SubscribeApplication }>(
|
||||||
"/v1/admin/application/subscribe_application",
|
"/api/v1/admin/application/subscribe_application",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -60,7 +60,7 @@ export async function deleteSubscribeApplication(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/application/subscribe_application",
|
"/api/v1/admin/application/subscribe_application",
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -80,7 +80,7 @@ export async function getSubscribeApplicationList(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetSubscribeApplicationListResponse }
|
API.Response & { data?: API.GetSubscribeApplicationListResponse }
|
||||||
>("/v1/admin/application/subscribe_application_list", {
|
>("/api/v1/admin/application/subscribe_application_list", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
|
|||||||
@ -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 }>(
|
||||||
"/v1/admin/auth-method/config",
|
"/api/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 }>(
|
||||||
"/v1/admin/auth-method/config",
|
"/api/v1/admin/auth-method/config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -40,7 +40,7 @@ export async function updateAuthMethodConfig(
|
|||||||
/** Get email support platform GET /v1/admin/auth-method/email_platform */
|
/** Get email support platform GET /v1/admin/auth-method/email_platform */
|
||||||
export async function getEmailPlatform(options?: { [key: string]: any }) {
|
export async function getEmailPlatform(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.PlatformResponse }>(
|
return request<API.Response & { data?: API.PlatformResponse }>(
|
||||||
"/v1/admin/auth-method/email_platform",
|
"/api/v1/admin/auth-method/email_platform",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -51,7 +51,7 @@ export async function getEmailPlatform(options?: { [key: string]: any }) {
|
|||||||
/** Get auth method list GET /v1/admin/auth-method/list */
|
/** Get auth method list GET /v1/admin/auth-method/list */
|
||||||
export async function getAuthMethodList(options?: { [key: string]: any }) {
|
export async function getAuthMethodList(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.GetAuthMethodListResponse }>(
|
return request<API.Response & { data?: API.GetAuthMethodListResponse }>(
|
||||||
"/v1/admin/auth-method/list",
|
"/api/v1/admin/auth-method/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -62,7 +62,7 @@ export async function getAuthMethodList(options?: { [key: string]: any }) {
|
|||||||
/** Get sms support platform GET /v1/admin/auth-method/sms_platform */
|
/** Get sms support platform GET /v1/admin/auth-method/sms_platform */
|
||||||
export async function getSmsPlatform(options?: { [key: string]: any }) {
|
export async function getSmsPlatform(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.PlatformResponse }>(
|
return request<API.Response & { data?: API.PlatformResponse }>(
|
||||||
"/v1/admin/auth-method/sms_platform",
|
"/api/v1/admin/auth-method/sms_platform",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -76,7 +76,7 @@ export async function testEmailSend(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/auth-method/test_email_send",
|
"/api/v1/admin/auth-method/test_email_send",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -94,7 +94,7 @@ export async function testSmsSend(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/auth-method/test_sms_send",
|
"/api/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 }>(
|
||||||
"/v1/admin/console/revenue",
|
"/api/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 }>(
|
||||||
"/v1/admin/console/server",
|
"/api/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 }>(
|
||||||
"/v1/admin/console/ticket",
|
"/api/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 }>(
|
||||||
"/v1/admin/console/user",
|
"/api/v1/admin/console/user",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function updateCoupon(
|
|||||||
body: API.UpdateCouponRequest,
|
body: API.UpdateCouponRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/coupon/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -21,7 +21,7 @@ export async function createCoupon(
|
|||||||
body: API.CreateCouponRequest,
|
body: API.CreateCouponRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/coupon/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -36,7 +36,7 @@ export async function deleteCoupon(
|
|||||||
body: API.DeleteCouponRequest,
|
body: API.DeleteCouponRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/coupon/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -51,7 +51,7 @@ export async function batchDeleteCoupon(
|
|||||||
body: API.BatchDeleteCouponRequest,
|
body: API.BatchDeleteCouponRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/coupon/batch", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/coupon/batch", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -68,7 +68,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 }>(
|
||||||
"/v1/admin/coupon/list",
|
"/api/v1/admin/coupon/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function updateDocument(
|
|||||||
body: API.UpdateDocumentRequest,
|
body: API.UpdateDocumentRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/document/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/document/", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -21,7 +21,7 @@ export async function createDocument(
|
|||||||
body: API.CreateDocumentRequest,
|
body: API.CreateDocumentRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/document/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/document/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -36,7 +36,7 @@ export async function deleteDocument(
|
|||||||
body: API.DeleteDocumentRequest,
|
body: API.DeleteDocumentRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/document/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/document/", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -51,20 +51,23 @@ export async function batchDeleteDocument(
|
|||||||
body: API.BatchDeleteDocumentRequest,
|
body: API.BatchDeleteDocumentRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/document/batch", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "DELETE",
|
"/api/v1/admin/document/batch",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "DELETE",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 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 }>(
|
||||||
"/v1/admin/document/detail",
|
"/api/v1/admin/document/detail",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -79,7 +82,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 }>(
|
||||||
"/v1/admin/document/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/balance/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/commission/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/email/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/gift/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/login/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/message/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/mobile/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/register/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/server/traffic/list",
|
"/api/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 }>(
|
||||||
"/v1/admin/log/setting",
|
"/api/v1/admin/log/setting",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -179,7 +179,7 @@ export async function updateLogSetting(
|
|||||||
body: API.LogSetting,
|
body: API.LogSetting,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/log/setting", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/log/setting", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -196,7 +196,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 }>(
|
||||||
"/v1/admin/log/subscribe/list",
|
"/api/v1/admin/log/subscribe/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -214,7 +214,7 @@ export async function filterResetSubscribeLog(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.FilterResetSubscribeLogResponse }>(
|
return request<API.Response & { data?: API.FilterResetSubscribeLogResponse }>(
|
||||||
"/v1/admin/log/subscribe/reset/list",
|
"/api/v1/admin/log/subscribe/reset/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -232,7 +232,7 @@ export async function filterUserSubscribeTrafficLog(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.FilterSubscribeTrafficResponse }>(
|
return request<API.Response & { data?: API.FilterSubscribeTrafficResponse }>(
|
||||||
"/v1/admin/log/subscribe/traffic/list",
|
"/api/v1/admin/log/subscribe/traffic/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -250,7 +250,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 }>(
|
||||||
"/v1/admin/log/traffic/details",
|
"/api/v1/admin/log/traffic/details",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export async function getBatchSendEmailTaskList(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetBatchSendEmailTaskListResponse }
|
API.Response & { data?: API.GetBatchSendEmailTaskListResponse }
|
||||||
>("/v1/admin/marketing/email/batch/list", {
|
>("/api/v1/admin/marketing/email/batch/list", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
@ -24,7 +24,7 @@ export async function getPreSendEmailCount(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.GetPreSendEmailCountResponse }>(
|
return request<API.Response & { data?: API.GetPreSendEmailCountResponse }>(
|
||||||
"/v1/admin/marketing/email/batch/pre-send-count",
|
"/api/v1/admin/marketing/email/batch/pre-send-count",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -42,7 +42,7 @@ export async function createBatchSendEmailTask(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/marketing/email/batch/send",
|
"/api/v1/admin/marketing/email/batch/send",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -61,7 +61,7 @@ export async function getBatchSendEmailTaskStatus(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetBatchSendEmailTaskStatusResponse }
|
API.Response & { data?: API.GetBatchSendEmailTaskStatusResponse }
|
||||||
>("/v1/admin/marketing/email/batch/status", {
|
>("/api/v1/admin/marketing/email/batch/status", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -77,7 +77,7 @@ export async function stopBatchSendEmailTask(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/marketing/email/batch/stop",
|
"/api/v1/admin/marketing/email/batch/stop",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -95,7 +95,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 }>(
|
||||||
"/v1/admin/marketing/quota/create",
|
"/api/v1/admin/marketing/quota/create",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -114,7 +114,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 }>(
|
||||||
"/v1/admin/marketing/quota/list",
|
"/api/v1/admin/marketing/quota/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -131,7 +131,7 @@ export async function queryQuotaTaskPreCount(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.QueryQuotaTaskPreCountResponse }>(
|
return request<API.Response & { data?: API.QueryQuotaTaskPreCountResponse }>(
|
||||||
"/v1/admin/marketing/quota/pre-count",
|
"/api/v1/admin/marketing/quota/pre-count",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function createOrder(
|
|||||||
body: API.CreateOrderRequest,
|
body: API.CreateOrderRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/order/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/order/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -23,7 +23,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 }>(
|
||||||
"/v1/admin/order/list",
|
"/api/v1/admin/order/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -39,7 +39,7 @@ export async function updateOrderStatus(
|
|||||||
body: API.UpdateOrderStatusRequest,
|
body: API.UpdateOrderStatusRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/order/status", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/order/status", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@ -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 }>(
|
||||||
"/v1/admin/payment/",
|
"/api/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 }>(
|
||||||
"/v1/admin/payment/",
|
"/api/v1/admin/payment/",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -42,7 +42,7 @@ export async function deletePaymentMethod(
|
|||||||
body: API.DeletePaymentMethodRequest,
|
body: API.DeletePaymentMethodRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/payment/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/payment/", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -59,7 +59,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 }>(
|
||||||
"/v1/admin/payment/list",
|
"/api/v1/admin/payment/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -73,7 +73,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 }>(
|
||||||
"/v1/admin/payment/platform",
|
"/api/v1/admin/payment/platform",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function createServer(
|
|||||||
body: API.CreateServerRequest,
|
body: API.CreateServerRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/server/create", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/server/create", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -21,7 +21,7 @@ export async function deleteServer(
|
|||||||
body: API.DeleteServerRequest,
|
body: API.DeleteServerRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/server/delete", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/server/delete", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -38,7 +38,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 }>(
|
||||||
"/v1/admin/server/list",
|
"/api/v1/admin/server/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -52,7 +52,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 }>(
|
||||||
"/v1/admin/server/migrate/has",
|
"/api/v1/admin/server/migrate/has",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -63,7 +63,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 }>(
|
||||||
"/v1/admin/server/migrate/run",
|
"/api/v1/admin/server/migrate/run",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -77,7 +77,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 }>(
|
||||||
"/v1/admin/server/node/create",
|
"/api/v1/admin/server/node/create",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -95,7 +95,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 }>(
|
||||||
"/v1/admin/server/node/delete",
|
"/api/v1/admin/server/node/delete",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -114,7 +114,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 }>(
|
||||||
"/v1/admin/server/node/list",
|
"/api/v1/admin/server/node/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -130,14 +130,17 @@ export async function resetSortWithNode(
|
|||||||
body: API.ResetSortRequest,
|
body: API.ResetSortRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/server/node/sort", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "POST",
|
"/api/v1/admin/server/node/sort",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "POST",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggle Node Status POST /v1/admin/server/node/status/toggle */
|
/** Toggle Node Status POST /v1/admin/server/node/status/toggle */
|
||||||
@ -146,7 +149,7 @@ export async function toggleNodeStatus(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/server/node/status/toggle",
|
"/api/v1/admin/server/node/status/toggle",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -161,7 +164,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 }>(
|
||||||
"/v1/admin/server/node/tags",
|
"/api/v1/admin/server/node/tags",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -175,7 +178,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 }>(
|
||||||
"/v1/admin/server/node/update",
|
"/api/v1/admin/server/node/update",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -194,7 +197,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 }>(
|
||||||
"/v1/admin/server/protocols",
|
"/api/v1/admin/server/protocols",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -211,7 +214,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 }>(
|
||||||
"/v1/admin/server/server/sort",
|
"/api/v1/admin/server/server/sort",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -228,7 +231,7 @@ export async function updateServer(
|
|||||||
body: API.UpdateServerRequest,
|
body: API.UpdateServerRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/server/update", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/server/update", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function updateSubscribe(
|
|||||||
body: API.UpdateSubscribeRequest,
|
body: API.UpdateSubscribeRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/subscribe/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/subscribe/", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -21,7 +21,7 @@ export async function createSubscribe(
|
|||||||
body: API.CreateSubscribeRequest,
|
body: API.CreateSubscribeRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/subscribe/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/subscribe/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -36,7 +36,7 @@ export async function deleteSubscribe(
|
|||||||
body: API.DeleteSubscribeRequest,
|
body: API.DeleteSubscribeRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/subscribe/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/subscribe/", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -51,14 +51,17 @@ export async function batchDeleteSubscribe(
|
|||||||
body: API.BatchDeleteSubscribeRequest,
|
body: API.BatchDeleteSubscribeRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/subscribe/batch", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "DELETE",
|
"/api/v1/admin/subscribe/batch",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "DELETE",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get subscribe details GET /v1/admin/subscribe/details */
|
/** Get subscribe details GET /v1/admin/subscribe/details */
|
||||||
@ -68,7 +71,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 }>(
|
||||||
"/v1/admin/subscribe/details",
|
"/api/v1/admin/subscribe/details",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -84,14 +87,17 @@ export async function updateSubscribeGroup(
|
|||||||
body: API.UpdateSubscribeGroupRequest,
|
body: API.UpdateSubscribeGroupRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/subscribe/group", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "PUT",
|
"/api/v1/admin/subscribe/group",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "PUT",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create subscribe group POST /v1/admin/subscribe/group */
|
/** Create subscribe group POST /v1/admin/subscribe/group */
|
||||||
@ -99,14 +105,17 @@ export async function createSubscribeGroup(
|
|||||||
body: API.CreateSubscribeGroupRequest,
|
body: API.CreateSubscribeGroupRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/subscribe/group", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "POST",
|
"/api/v1/admin/subscribe/group",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "POST",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Delete subscribe group DELETE /v1/admin/subscribe/group */
|
/** Delete subscribe group DELETE /v1/admin/subscribe/group */
|
||||||
@ -114,14 +123,17 @@ export async function deleteSubscribeGroup(
|
|||||||
body: API.DeleteSubscribeGroupRequest,
|
body: API.DeleteSubscribeGroupRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/subscribe/group", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "DELETE",
|
"/api/v1/admin/subscribe/group",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "DELETE",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Batch delete subscribe group DELETE /v1/admin/subscribe/group/batch */
|
/** Batch delete subscribe group DELETE /v1/admin/subscribe/group/batch */
|
||||||
@ -130,7 +142,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 }>(
|
||||||
"/v1/admin/subscribe/group/batch",
|
"/api/v1/admin/subscribe/group/batch",
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
@ -145,7 +157,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 }>(
|
||||||
"/v1/admin/subscribe/group/list",
|
"/api/v1/admin/subscribe/group/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -160,7 +172,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 }>(
|
||||||
"/v1/admin/subscribe/list",
|
"/api/v1/admin/subscribe/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -174,7 +186,7 @@ export async function getSubscribeList(
|
|||||||
/** Reset all subscribe tokens POST /v1/admin/subscribe/reset_all_token */
|
/** Reset all subscribe tokens POST /v1/admin/subscribe/reset_all_token */
|
||||||
export async function resetAllSubscribeToken(options?: { [key: string]: any }) {
|
export async function resetAllSubscribeToken(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.ResetAllSubscribeTokenResponse }>(
|
return request<API.Response & { data?: API.ResetAllSubscribeTokenResponse }>(
|
||||||
"/v1/admin/subscribe/reset_all_token",
|
"/api/v1/admin/subscribe/reset_all_token",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -187,12 +199,15 @@ export async function subscribeSort(
|
|||||||
body: API.SubscribeSortRequest,
|
body: API.SubscribeSortRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/subscribe/sort", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "POST",
|
"/api/v1/admin/subscribe/sort",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "POST",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 }>(
|
||||||
"/v1/admin/system/currency_config",
|
"/api/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 }>(
|
||||||
"/v1/admin/system/currency_config",
|
"/api/v1/admin/system/currency_config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -33,7 +33,7 @@ export async function updateCurrencyConfig(
|
|||||||
/** Get Node Multiplier GET /v1/admin/system/get_node_multiplier */
|
/** Get Node Multiplier GET /v1/admin/system/get_node_multiplier */
|
||||||
export async function getNodeMultiplier(options?: { [key: string]: any }) {
|
export async function getNodeMultiplier(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.GetNodeMultiplierResponse }>(
|
return request<API.Response & { data?: API.GetNodeMultiplierResponse }>(
|
||||||
"/v1/admin/system/get_node_multiplier",
|
"/api/v1/admin/system/get_node_multiplier",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -44,7 +44,7 @@ export async function getNodeMultiplier(options?: { [key: string]: any }) {
|
|||||||
/** Get invite config GET /v1/admin/system/invite_config */
|
/** Get invite config GET /v1/admin/system/invite_config */
|
||||||
export async function getInviteConfig(options?: { [key: string]: any }) {
|
export async function getInviteConfig(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.InviteConfig }>(
|
return request<API.Response & { data?: API.InviteConfig }>(
|
||||||
"/v1/admin/system/invite_config",
|
"/api/v1/admin/system/invite_config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -58,7 +58,7 @@ export async function updateInviteConfig(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/system/invite_config",
|
"/api/v1/admin/system/invite_config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -73,7 +73,7 @@ export async function updateInviteConfig(
|
|||||||
/** Get Module Config GET /v1/admin/system/module */
|
/** Get Module Config GET /v1/admin/system/module */
|
||||||
export async function getModuleConfig(options?: { [key: string]: any }) {
|
export async function getModuleConfig(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.ModuleConfig }>(
|
return request<API.Response & { data?: API.ModuleConfig }>(
|
||||||
"/v1/admin/system/module",
|
"/api/v1/admin/system/module",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -84,7 +84,7 @@ export async function getModuleConfig(options?: { [key: string]: any }) {
|
|||||||
/** Get node config GET /v1/admin/system/node_config */
|
/** Get node config GET /v1/admin/system/node_config */
|
||||||
export async function getNodeConfig(options?: { [key: string]: any }) {
|
export async function getNodeConfig(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.NodeConfig }>(
|
return request<API.Response & { data?: API.NodeConfig }>(
|
||||||
"/v1/admin/system/node_config",
|
"/api/v1/admin/system/node_config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -98,7 +98,7 @@ export async function updateNodeConfig(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/system/node_config",
|
"/api/v1/admin/system/node_config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -113,7 +113,7 @@ export async function updateNodeConfig(
|
|||||||
/** PreView Node Multiplier GET /v1/admin/system/node_multiplier/preview */
|
/** PreView Node Multiplier GET /v1/admin/system/node_multiplier/preview */
|
||||||
export async function preViewNodeMultiplier(options?: { [key: string]: any }) {
|
export async function preViewNodeMultiplier(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.PreViewNodeMultiplierResponse }>(
|
return request<API.Response & { data?: API.PreViewNodeMultiplierResponse }>(
|
||||||
"/v1/admin/system/node_multiplier/preview",
|
"/api/v1/admin/system/node_multiplier/preview",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -124,7 +124,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 }>(
|
||||||
"/v1/admin/system/privacy",
|
"/api/v1/admin/system/privacy",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -137,20 +137,23 @@ export async function updatePrivacyPolicyConfig(
|
|||||||
body: API.PrivacyPolicyConfig,
|
body: API.PrivacyPolicyConfig,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/system/privacy", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "PUT",
|
"/api/v1/admin/system/privacy",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "PUT",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 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 }>(
|
||||||
"/v1/admin/system/register_config",
|
"/api/v1/admin/system/register_config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -164,7 +167,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 }>(
|
||||||
"/v1/admin/system/register_config",
|
"/api/v1/admin/system/register_config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -182,7 +185,7 @@ export async function setNodeMultiplier(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/system/set_node_multiplier",
|
"/api/v1/admin/system/set_node_multiplier",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -197,7 +200,7 @@ export async function setNodeMultiplier(
|
|||||||
/** setting telegram bot POST /v1/admin/system/setting_telegram_bot */
|
/** setting telegram bot POST /v1/admin/system/setting_telegram_bot */
|
||||||
export async function settingTelegramBot(options?: { [key: string]: any }) {
|
export async function settingTelegramBot(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/system/setting_telegram_bot",
|
"/api/v1/admin/system/setting_telegram_bot",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -208,7 +211,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 }>(
|
||||||
"/v1/admin/system/site_config",
|
"/api/v1/admin/system/site_config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -222,7 +225,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 }>(
|
||||||
"/v1/admin/system/site_config",
|
"/api/v1/admin/system/site_config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -237,7 +240,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 }>(
|
||||||
"/v1/admin/system/subscribe_config",
|
"/api/v1/admin/system/subscribe_config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -251,7 +254,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 }>(
|
||||||
"/v1/admin/system/subscribe_config",
|
"/api/v1/admin/system/subscribe_config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -266,7 +269,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 }>(
|
||||||
"/v1/admin/system/tos_config",
|
"/api/v1/admin/system/tos_config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -279,20 +282,23 @@ export async function updateTosConfig(
|
|||||||
body: API.TosConfig,
|
body: API.TosConfig,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/system/tos_config", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "PUT",
|
"/api/v1/admin/system/tos_config",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "PUT",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 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 }>(
|
||||||
"/v1/admin/system/verify_code_config",
|
"/api/v1/admin/system/verify_code_config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -306,7 +312,7 @@ export async function updateVerifyCodeConfig(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/system/verify_code_config",
|
"/api/v1/admin/system/verify_code_config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -321,7 +327,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 }>(
|
||||||
"/v1/admin/system/verify_config",
|
"/api/v1/admin/system/verify_config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -335,7 +341,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 }>(
|
||||||
"/v1/admin/system/verify_config",
|
"/api/v1/admin/system/verify_config",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function updateTicketStatus(
|
|||||||
body: API.UpdateTicketStatusRequest,
|
body: API.UpdateTicketStatusRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/ticket/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/ticket/", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -23,7 +23,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 }>(
|
||||||
"/v1/admin/ticket/detail",
|
"/api/v1/admin/ticket/detail",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -39,7 +39,7 @@ export async function createTicketFollow(
|
|||||||
body: API.CreateTicketFollowRequest,
|
body: API.CreateTicketFollowRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/ticket/follow", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/ticket/follow", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -56,7 +56,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 }>(
|
||||||
"/v1/admin/ticket/list",
|
"/api/v1/admin/ticket/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -1,10 +1,28 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import request from "@workspace/ui/lib/request";
|
import request from "@workspace/ui/lib/request";
|
||||||
|
|
||||||
|
/** Query IP Location GET /v1/admin/tool/ip/location */
|
||||||
|
export async function queryIpLocation(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.QueryIPLocationParams,
|
||||||
|
options?: { [key: string]: any }
|
||||||
|
) {
|
||||||
|
return request<API.Response & { data?: API.QueryIPLocationResponse }>(
|
||||||
|
"/api/v1/admin/tool/ip/location",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** 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 }>(
|
||||||
"/v1/admin/tool/log",
|
"/api/v1/admin/tool/log",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -14,7 +32,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 }>("/v1/admin/tool/restart", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/tool/restart", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
});
|
});
|
||||||
@ -23,7 +41,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 }>(
|
||||||
"/v1/admin/tool/version",
|
"/api/v1/admin/tool/version",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
15
packages/ui/src/services/admin/typings.d.ts
vendored
15
packages/ui/src/services/admin/typings.d.ts
vendored
@ -1648,6 +1648,20 @@ declare namespace API {
|
|||||||
list: Document[];
|
list: Document[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type QueryIPLocationParams = {
|
||||||
|
ip: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type QueryIPLocationRequest = {
|
||||||
|
ip: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type QueryIPLocationResponse = {
|
||||||
|
country: string;
|
||||||
|
region?: string;
|
||||||
|
city: string;
|
||||||
|
};
|
||||||
|
|
||||||
type QueryNodeTagResponse = {
|
type QueryNodeTagResponse = {
|
||||||
tags: string[];
|
tags: string[];
|
||||||
};
|
};
|
||||||
@ -2388,6 +2402,7 @@ declare namespace API {
|
|||||||
enable_trade_notify: boolean;
|
enable_trade_notify: boolean;
|
||||||
auth_methods: UserAuthMethod[];
|
auth_methods: UserAuthMethod[];
|
||||||
user_devices: UserDevice[];
|
user_devices: UserDevice[];
|
||||||
|
rules: string[];
|
||||||
created_at: number;
|
created_at: number;
|
||||||
updated_at: number;
|
updated_at: number;
|
||||||
deleted_at?: number;
|
deleted_at?: number;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function createUser(
|
|||||||
body: API.CreateUserRequest,
|
body: API.CreateUserRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/user/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -22,7 +22,7 @@ export async function deleteUser(
|
|||||||
params: API.DeleteUserParams,
|
params: API.DeleteUserParams,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/user/", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
@ -34,7 +34,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 }>(
|
||||||
"/v1/admin/user/auth_method",
|
"/api/v1/admin/user/auth_method",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -47,14 +47,17 @@ export async function updateUserAuthMethod(
|
|||||||
body: API.UpdateUserAuthMethodRequest,
|
body: API.UpdateUserAuthMethodRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/auth_method", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "PUT",
|
"/api/v1/admin/user/auth_method",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "PUT",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create user auth method POST /v1/admin/user/auth_method */
|
/** Create user auth method POST /v1/admin/user/auth_method */
|
||||||
@ -62,14 +65,17 @@ export async function createUserAuthMethod(
|
|||||||
body: API.CreateUserAuthMethodRequest,
|
body: API.CreateUserAuthMethodRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/auth_method", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "POST",
|
"/api/v1/admin/user/auth_method",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "POST",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Delete user auth method DELETE /v1/admin/user/auth_method */
|
/** Delete user auth method DELETE /v1/admin/user/auth_method */
|
||||||
@ -77,14 +83,17 @@ export async function deleteUserAuthMethod(
|
|||||||
body: API.DeleteUserAuthMethodRequest,
|
body: API.DeleteUserAuthMethodRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/auth_method", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "DELETE",
|
"/api/v1/admin/user/auth_method",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "DELETE",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Update user basic info PUT /v1/admin/user/basic */
|
/** Update user basic info PUT /v1/admin/user/basic */
|
||||||
@ -92,7 +101,7 @@ export async function updateUserBasicInfo(
|
|||||||
body: API.UpdateUserBasiceInfoRequest,
|
body: API.UpdateUserBasiceInfoRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/basic", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/user/basic", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -107,7 +116,7 @@ export async function batchDeleteUser(
|
|||||||
body: API.BatchDeleteUserRequest,
|
body: API.BatchDeleteUserRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/batch", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/user/batch", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -119,10 +128,13 @@ 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 }>("/v1/admin/user/current", {
|
return request<API.Response & { data?: API.User }>(
|
||||||
method: "GET",
|
"/api/v1/admin/user/current",
|
||||||
...(options || {}),
|
{
|
||||||
});
|
method: "GET",
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get user detail GET /v1/admin/user/detail */
|
/** Get user detail GET /v1/admin/user/detail */
|
||||||
@ -131,13 +143,16 @@ export async function getUserDetail(
|
|||||||
params: API.GetUserDetailParams,
|
params: API.GetUserDetailParams,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.User }>("/v1/admin/user/detail", {
|
return request<API.Response & { data?: API.User }>(
|
||||||
method: "GET",
|
"/api/v1/admin/user/detail",
|
||||||
params: {
|
{
|
||||||
...params,
|
method: "GET",
|
||||||
},
|
params: {
|
||||||
...(options || {}),
|
...params,
|
||||||
});
|
},
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** User device PUT /v1/admin/user/device */
|
/** User device PUT /v1/admin/user/device */
|
||||||
@ -145,7 +160,7 @@ export async function updateUserDevice(
|
|||||||
body: API.UserDevice,
|
body: API.UserDevice,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/device", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/user/device", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -160,7 +175,7 @@ export async function deleteUserDevice(
|
|||||||
body: API.DeleteUserDeivceRequest,
|
body: API.DeleteUserDeivceRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/device", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/user/device", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -176,7 +191,7 @@ export async function kickOfflineByUserDevice(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/admin/user/device/kick_offline",
|
"/api/v1/admin/user/device/kick_offline",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -195,7 +210,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 }>(
|
||||||
"/v1/admin/user/list",
|
"/api/v1/admin/user/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -213,7 +228,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 }>(
|
||||||
"/v1/admin/user/login/logs",
|
"/api/v1/admin/user/login/logs",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -229,7 +244,7 @@ export async function updateUserNotifySetting(
|
|||||||
body: API.UpdateUserNotifySettingRequest,
|
body: API.UpdateUserNotifySettingRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/notify", {
|
return request<API.Response & { data?: any }>("/api/v1/admin/user/notify", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -246,7 +261,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 }>(
|
||||||
"/v1/admin/user/subscribe",
|
"/api/v1/admin/user/subscribe",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -262,14 +277,17 @@ export async function updateUserSubscribe(
|
|||||||
body: API.UpdateUserSubscribeRequest,
|
body: API.UpdateUserSubscribeRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/subscribe", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "PUT",
|
"/api/v1/admin/user/subscribe",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "PUT",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create user subcribe POST /v1/admin/user/subscribe */
|
/** Create user subcribe POST /v1/admin/user/subscribe */
|
||||||
@ -277,14 +295,17 @@ export async function createUserSubscribe(
|
|||||||
body: API.CreateUserSubscribeRequest,
|
body: API.CreateUserSubscribeRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/subscribe", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "POST",
|
"/api/v1/admin/user/subscribe",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "POST",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Delete user subcribe DELETE /v1/admin/user/subscribe */
|
/** Delete user subcribe DELETE /v1/admin/user/subscribe */
|
||||||
@ -292,14 +313,17 @@ export async function deleteUserSubscribe(
|
|||||||
body: API.DeleteUserSubscribeRequest,
|
body: API.DeleteUserSubscribeRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/admin/user/subscribe", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "DELETE",
|
"/api/v1/admin/user/subscribe",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "DELETE",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get user subcribe by id GET /v1/admin/user/subscribe/detail */
|
/** Get user subcribe by id GET /v1/admin/user/subscribe/detail */
|
||||||
@ -309,7 +333,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 }>(
|
||||||
"/v1/admin/user/subscribe/detail",
|
"/api/v1/admin/user/subscribe/detail",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -327,7 +351,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 }>(
|
||||||
"/v1/admin/user/subscribe/device",
|
"/api/v1/admin/user/subscribe/device",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -345,7 +369,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 }>(
|
||||||
"/v1/admin/user/subscribe/logs",
|
"/api/v1/admin/user/subscribe/logs",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -364,7 +388,7 @@ export async function getUserSubscribeResetTrafficLogs(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetUserSubscribeResetTrafficLogsResponse }
|
API.Response & { data?: API.GetUserSubscribeResetTrafficLogsResponse }
|
||||||
>("/v1/admin/user/subscribe/reset/logs", {
|
>("/api/v1/admin/user/subscribe/reset/logs", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
@ -381,7 +405,7 @@ export async function getUserSubscribeTrafficLogs(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetUserSubscribeTrafficLogsResponse }
|
API.Response & { data?: API.GetUserSubscribeTrafficLogsResponse }
|
||||||
>("/v1/admin/user/subscribe/traffic_logs", {
|
>("/api/v1/admin/user/subscribe/traffic_logs", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
|
|||||||
@ -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 }>(
|
||||||
"/v1/auth/check",
|
"/api/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 }>(
|
||||||
"/v1/auth/check/telephone",
|
"/api/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 }>(
|
||||||
"/v1/auth/login",
|
"/api/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 }>(
|
||||||
"/v1/auth/login/device",
|
"/api/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 }>(
|
||||||
"/v1/auth/login/telephone",
|
"/api/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 }>(
|
||||||
"/v1/auth/register",
|
"/api/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 }>(
|
||||||
"/v1/auth/register/telephone",
|
"/api/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 }>(
|
||||||
"/v1/auth/reset",
|
"/api/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 }>(
|
||||||
"/v1/auth/reset/telephone",
|
"/api/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 }>(
|
||||||
"/v1/common/ads",
|
"/api/v1/common/ads",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -25,7 +25,7 @@ export async function checkVerificationCode(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.CheckVerificationCodeRespone }>(
|
return request<API.Response & { data?: API.CheckVerificationCodeRespone }>(
|
||||||
"/v1/common/check_verification_code",
|
"/api/v1/common/check_verification_code",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -40,7 +40,7 @@ export async function checkVerificationCode(
|
|||||||
/** Get Client GET /v1/common/client */
|
/** Get Client GET /v1/common/client */
|
||||||
export async function getClient(options?: { [key: string]: any }) {
|
export async function getClient(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.GetSubscribeClientResponse }>(
|
return request<API.Response & { data?: API.GetSubscribeClientResponse }>(
|
||||||
"/v1/common/client",
|
"/api/v1/common/client",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -51,7 +51,7 @@ export async function getClient(options?: { [key: string]: any }) {
|
|||||||
/** 此处后端没有提供注释 GET /v1/common/heartbeat */
|
/** 此处后端没有提供注释 GET /v1/common/heartbeat */
|
||||||
export async function heartbeat(options?: { [key: string]: any }) {
|
export async function heartbeat(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.HeartbeatResponse }>(
|
return request<API.Response & { data?: API.HeartbeatResponse }>(
|
||||||
"/v1/common/heartbeat",
|
"/api/v1/common/heartbeat",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -65,7 +65,7 @@ export async function sendEmailCode(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.SendCodeResponse }>(
|
return request<API.Response & { data?: API.SendCodeResponse }>(
|
||||||
"/v1/common/send_code",
|
"/api/v1/common/send_code",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -83,7 +83,7 @@ export async function sendSmsCode(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.SendCodeResponse }>(
|
return request<API.Response & { data?: API.SendCodeResponse }>(
|
||||||
"/v1/common/send_sms_code",
|
"/api/v1/common/send_sms_code",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -98,7 +98,7 @@ export async function sendSmsCode(
|
|||||||
/** Get global config GET /v1/common/site/config */
|
/** Get global config GET /v1/common/site/config */
|
||||||
export async function getGlobalConfig(options?: { [key: string]: any }) {
|
export async function getGlobalConfig(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.GetGlobalConfigResponse }>(
|
return request<API.Response & { data?: API.GetGlobalConfigResponse }>(
|
||||||
"/v1/common/site/config",
|
"/api/v1/common/site/config",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -109,7 +109,7 @@ export async function getGlobalConfig(options?: { [key: string]: any }) {
|
|||||||
/** Get Privacy Policy GET /v1/common/site/privacy */
|
/** Get Privacy Policy GET /v1/common/site/privacy */
|
||||||
export async function getPrivacyPolicy(options?: { [key: string]: any }) {
|
export async function getPrivacyPolicy(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.PrivacyPolicyConfig }>(
|
return request<API.Response & { data?: API.PrivacyPolicyConfig }>(
|
||||||
"/v1/common/site/privacy",
|
"/api/v1/common/site/privacy",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -120,7 +120,7 @@ export async function getPrivacyPolicy(options?: { [key: string]: any }) {
|
|||||||
/** Get stat GET /v1/common/site/stat */
|
/** Get stat GET /v1/common/site/stat */
|
||||||
export async function getStat(options?: { [key: string]: any }) {
|
export async function getStat(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.GetStatResponse }>(
|
return request<API.Response & { data?: API.GetStatResponse }>(
|
||||||
"/v1/common/site/stat",
|
"/api/v1/common/site/stat",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -131,7 +131,7 @@ export async function getStat(options?: { [key: string]: any }) {
|
|||||||
/** Get Tos Content GET /v1/common/site/tos */
|
/** Get Tos Content GET /v1/common/site/tos */
|
||||||
export async function getTos(options?: { [key: string]: any }) {
|
export async function getTos(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.GetTosResponse }>(
|
return request<API.Response & { data?: API.GetTosResponse }>(
|
||||||
"/v1/common/site/tos",
|
"/api/v1/common/site/tos",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import request from "@workspace/ui/lib/request";
|
|||||||
/** Apple Login Callback POST /v1/auth/oauth/callback/apple */
|
/** Apple Login Callback POST /v1/auth/oauth/callback/apple */
|
||||||
export async function appleLoginCallback(
|
export async function appleLoginCallback(
|
||||||
body: {
|
body: {
|
||||||
|
code: string;
|
||||||
id_token: string;
|
id_token: string;
|
||||||
state: string;
|
state: string;
|
||||||
},
|
},
|
||||||
@ -17,9 +18,9 @@ export async function appleLoginCallback(
|
|||||||
if (item !== undefined && item !== null) {
|
if (item !== undefined && item !== null) {
|
||||||
if (typeof item === "object" && !(item instanceof File)) {
|
if (typeof item === "object" && !(item instanceof File)) {
|
||||||
if (Array.isArray(item)) {
|
if (Array.isArray(item)) {
|
||||||
for (const f of item) {
|
item.forEach((f) => {
|
||||||
formData.append(ele, f || "");
|
formData.append(ele, f || "");
|
||||||
}
|
});
|
||||||
} else {
|
} else {
|
||||||
formData.append(
|
formData.append(
|
||||||
ele,
|
ele,
|
||||||
@ -33,7 +34,7 @@ export async function appleLoginCallback(
|
|||||||
});
|
});
|
||||||
|
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/auth/oauth/callback/apple",
|
"/api/v1/auth/oauth/callback/apple",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: formData,
|
data: formData,
|
||||||
@ -48,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 }>(
|
||||||
"/v1/auth/oauth/login",
|
"/api/v1/auth/oauth/login",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -66,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 }>(
|
||||||
"/v1/auth/oauth/login/token",
|
"/api/v1/auth/oauth/login/token",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
1
packages/ui/src/services/common/typings.d.ts
vendored
1
packages/ui/src/services/common/typings.d.ts
vendored
@ -1019,6 +1019,7 @@ declare namespace API {
|
|||||||
enable_trade_notify: boolean;
|
enable_trade_notify: boolean;
|
||||||
auth_methods: UserAuthMethod[];
|
auth_methods: UserAuthMethod[];
|
||||||
user_devices: UserDevice[];
|
user_devices: UserDevice[];
|
||||||
|
rules: string[];
|
||||||
created_at: number;
|
created_at: number;
|
||||||
updated_at: number;
|
updated_at: number;
|
||||||
deleted_at?: number;
|
deleted_at?: number;
|
||||||
|
|||||||
@ -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 }>(
|
||||||
"/v1/public/announcement/list",
|
"/api/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 }>(
|
||||||
"/v1/public/document/detail",
|
"/api/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 }>(
|
||||||
"/v1/public/document/list",
|
"/api/v1/public/document/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function closeOrder(
|
|||||||
body: API.CloseOrderRequest,
|
body: API.CloseOrderRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/order/close", {
|
return request<API.Response & { data?: any }>("/api/v1/public/order/close", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -23,7 +23,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 }>(
|
||||||
"/v1/public/order/detail",
|
"/api/v1/public/order/detail",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -41,7 +41,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 }>(
|
||||||
"/v1/public/order/list",
|
"/api/v1/public/order/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -58,7 +58,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 }>(
|
||||||
"/v1/public/order/pre",
|
"/api/v1/public/order/pre",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -76,7 +76,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 }>(
|
||||||
"/v1/public/order/purchase",
|
"/api/v1/public/order/purchase",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -94,7 +94,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 }>(
|
||||||
"/v1/public/order/recharge",
|
"/api/v1/public/order/recharge",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -112,7 +112,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 }>(
|
||||||
"/v1/public/order/renewal",
|
"/api/v1/public/order/renewal",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -130,7 +130,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 }>(
|
||||||
"/v1/public/order/reset",
|
"/api/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 }
|
||||||
>("/v1/public/payment/methods", {
|
>("/api/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 }>(
|
||||||
"/v1/public/portal/order/checkout",
|
"/api/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 }>(
|
||||||
"/v1/public/portal/order/status",
|
"/api/v1/public/portal/order/status",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -43,7 +43,7 @@ export async function getAvailablePaymentMethods(options?: {
|
|||||||
}) {
|
}) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
|
API.Response & { data?: API.GetAvailablePaymentMethodsResponse }
|
||||||
>("/v1/public/portal/payment-method", {
|
>("/api/v1/public/portal/payment-method", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
});
|
});
|
||||||
@ -55,7 +55,7 @@ export async function prePurchaseOrder(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.PrePurchaseOrderResponse }>(
|
return request<API.Response & { data?: API.PrePurchaseOrderResponse }>(
|
||||||
"/v1/public/portal/pre",
|
"/api/v1/public/portal/pre",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -73,7 +73,7 @@ export async function purchase(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.PortalPurchaseResponse }>(
|
return request<API.Response & { data?: API.PortalPurchaseResponse }>(
|
||||||
"/v1/public/portal/purchase",
|
"/api/v1/public/portal/purchase",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -92,7 +92,7 @@ export async function getSubscription(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.GetSubscriptionResponse }>(
|
return request<API.Response & { data?: API.GetSubscriptionResponse }>(
|
||||||
"/v1/public/portal/subscribe",
|
"/api/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 }>(
|
||||||
"/v1/public/subscribe/list",
|
"/api/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 }
|
||||||
>("/v1/public/subscribe/node/list", {
|
>("/api/v1/public/subscribe/node/list", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export async function updateUserTicketStatus(
|
|||||||
body: API.UpdateUserTicketStatusRequest,
|
body: API.UpdateUserTicketStatusRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/ticket/", {
|
return request<API.Response & { data?: any }>("/api/v1/public/ticket/", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -21,7 +21,7 @@ export async function createUserTicket(
|
|||||||
body: API.CreateUserTicketRequest,
|
body: API.CreateUserTicketRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/ticket/", {
|
return request<API.Response & { data?: any }>("/api/v1/public/ticket/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -38,7 +38,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 }>(
|
||||||
"/v1/public/ticket/detail",
|
"/api/v1/public/ticket/detail",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -54,14 +54,17 @@ export async function createUserTicketFollow(
|
|||||||
body: API.CreateUserTicketFollowRequest,
|
body: API.CreateUserTicketFollowRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/ticket/follow", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "POST",
|
"/api/v1/public/ticket/follow",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "POST",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get ticket list GET /v1/public/ticket/list */
|
/** Get ticket list GET /v1/public/ticket/list */
|
||||||
@ -71,7 +74,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 }>(
|
||||||
"/v1/public/ticket/list",
|
"/api/v1/public/ticket/list",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
36
packages/ui/src/services/user/typings.d.ts
vendored
36
packages/ui/src/services/user/typings.d.ts
vendored
@ -170,6 +170,11 @@ declare namespace API {
|
|||||||
timestamp: number;
|
timestamp: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type CommissionWithdrawRequest = {
|
||||||
|
amount: number;
|
||||||
|
content: string;
|
||||||
|
};
|
||||||
|
|
||||||
type Coupon = {
|
type Coupon = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
@ -816,6 +821,21 @@ declare namespace API {
|
|||||||
list: UserSubscribeInfo[];
|
list: UserSubscribeInfo[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type QueryWithdrawalLogListRequest = {
|
||||||
|
page: number;
|
||||||
|
size: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type QueryWithdrawalLogListResponse = {
|
||||||
|
list: WithdrawalLog[];
|
||||||
|
total: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type QueryWithdrawalLogParams = {
|
||||||
|
page: number;
|
||||||
|
size: number;
|
||||||
|
};
|
||||||
|
|
||||||
type RechargeOrderRequest = {
|
type RechargeOrderRequest = {
|
||||||
amount: number;
|
amount: number;
|
||||||
payment: number;
|
payment: number;
|
||||||
@ -1089,6 +1109,10 @@ declare namespace API {
|
|||||||
password: string;
|
password: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type UpdateUserRulesRequest = {
|
||||||
|
rules: string[];
|
||||||
|
};
|
||||||
|
|
||||||
type UpdateUserSubscribeNoteRequest = {
|
type UpdateUserSubscribeNoteRequest = {
|
||||||
user_subscribe_id: number;
|
user_subscribe_id: number;
|
||||||
note: string;
|
note: string;
|
||||||
@ -1118,6 +1142,7 @@ declare namespace API {
|
|||||||
enable_trade_notify: boolean;
|
enable_trade_notify: boolean;
|
||||||
auth_methods: UserAuthMethod[];
|
auth_methods: UserAuthMethod[];
|
||||||
user_devices: UserDevice[];
|
user_devices: UserDevice[];
|
||||||
|
rules: string[];
|
||||||
created_at: number;
|
created_at: number;
|
||||||
updated_at: number;
|
updated_at: number;
|
||||||
deleted_at?: number;
|
deleted_at?: number;
|
||||||
@ -1255,4 +1280,15 @@ declare namespace API {
|
|||||||
security: string;
|
security: string;
|
||||||
security_config: SecurityConfig;
|
security_config: SecurityConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type WithdrawalLog = {
|
||||||
|
id: number;
|
||||||
|
user_id: number;
|
||||||
|
amount: number;
|
||||||
|
content: string;
|
||||||
|
status: number;
|
||||||
|
reason?: string;
|
||||||
|
created_at: number;
|
||||||
|
updated_at: number;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 }>(
|
||||||
"/v1/public/user/affiliate/count",
|
"/api/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 }>(
|
||||||
"/v1/public/user/affiliate/list",
|
"/api/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 }>(
|
||||||
"/v1/public/user/balance_log",
|
"/api/v1/public/user/balance_log",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -46,14 +46,17 @@ export async function updateBindEmail(
|
|||||||
body: API.UpdateBindEmailRequest,
|
body: API.UpdateBindEmailRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/user/bind_email", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "PUT",
|
"/api/v1/public/user/bind_email",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "PUT",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Update Bind Mobile PUT /v1/public/user/bind_mobile */
|
/** Update Bind Mobile PUT /v1/public/user/bind_mobile */
|
||||||
@ -61,14 +64,17 @@ export async function updateBindMobile(
|
|||||||
body: API.UpdateBindMobileRequest,
|
body: API.UpdateBindMobileRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/user/bind_mobile", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "PUT",
|
"/api/v1/public/user/bind_mobile",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "PUT",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Bind OAuth POST /v1/public/user/bind_oauth */
|
/** Bind OAuth POST /v1/public/user/bind_oauth */
|
||||||
@ -77,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 }>(
|
||||||
"/v1/public/user/bind_oauth",
|
"/api/v1/public/user/bind_oauth",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -95,7 +101,7 @@ export async function bindOAuthCallback(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>(
|
return request<API.Response & { data?: any }>(
|
||||||
"/v1/public/user/bind_oauth/callback",
|
"/api/v1/public/user/bind_oauth/callback",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -110,7 +116,7 @@ export async function bindOAuthCallback(
|
|||||||
/** Bind Telegram GET /v1/public/user/bind_telegram */
|
/** Bind Telegram GET /v1/public/user/bind_telegram */
|
||||||
export async function bindTelegram(options?: { [key: string]: any }) {
|
export async function bindTelegram(options?: { [key: string]: any }) {
|
||||||
return request<API.Response & { data?: API.BindTelegramResponse }>(
|
return request<API.Response & { data?: API.BindTelegramResponse }>(
|
||||||
"/v1/public/user/bind_telegram",
|
"/api/v1/public/user/bind_telegram",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -126,7 +132,7 @@ export async function queryUserCommissionLog(
|
|||||||
) {
|
) {
|
||||||
return request<
|
return request<
|
||||||
API.Response & { data?: API.QueryUserCommissionLogListResponse }
|
API.Response & { data?: API.QueryUserCommissionLogListResponse }
|
||||||
>("/v1/public/user/commission_log", {
|
>("/api/v1/public/user/commission_log", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
@ -135,10 +141,28 @@ export async function queryUserCommissionLog(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Commission Withdraw POST /v1/public/user/commission_withdraw */
|
||||||
|
export async function commissionWithdraw(
|
||||||
|
body: API.CommissionWithdrawRequest,
|
||||||
|
options?: { [key: string]: any }
|
||||||
|
) {
|
||||||
|
return request<API.Response & { data?: API.WithdrawalLog }>(
|
||||||
|
"/api/v1/public/user/commission_withdraw",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** 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 }>(
|
||||||
"/v1/public/user/devices",
|
"/api/v1/public/user/devices",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -148,10 +172,13 @@ 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 }>("/v1/public/user/info", {
|
return request<API.Response & { data?: API.User }>(
|
||||||
method: "GET",
|
"/api/v1/public/user/info",
|
||||||
...(options || {}),
|
{
|
||||||
});
|
method: "GET",
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get Login Log GET /v1/public/user/login_log */
|
/** Get Login Log GET /v1/public/user/login_log */
|
||||||
@ -161,7 +188,7 @@ export async function getLoginLog(
|
|||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.GetLoginLogResponse }>(
|
return request<API.Response & { data?: API.GetLoginLogResponse }>(
|
||||||
"/v1/public/user/login_log",
|
"/api/v1/public/user/login_log",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -177,7 +204,7 @@ export async function updateUserNotify(
|
|||||||
body: API.UpdateUserNotifyRequest,
|
body: API.UpdateUserNotifyRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/user/notify", {
|
return request<API.Response & { data?: any }>("/api/v1/public/user/notify", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -190,7 +217,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 }>(
|
||||||
"/v1/public/user/oauth_methods",
|
"/api/v1/public/user/oauth_methods",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -203,7 +230,25 @@ export async function updateUserPassword(
|
|||||||
body: API.UpdateUserPasswordRequest,
|
body: API.UpdateUserPasswordRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/user/password", {
|
return request<API.Response & { data?: any }>(
|
||||||
|
"/api/v1/public/user/password",
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Update User Rules PUT /v1/public/user/rules */
|
||||||
|
export async function updateUserRules(
|
||||||
|
body: API.UpdateUserRulesRequest,
|
||||||
|
options?: { [key: string]: any }
|
||||||
|
) {
|
||||||
|
return request<API.Response & { data?: any }>("/api/v1/public/user/rules", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -216,7 +261,7 @@ export async function updateUserPassword(
|
|||||||
/** 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 }>(
|
||||||
"/v1/public/user/subscribe",
|
"/api/v1/public/user/subscribe",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -231,7 +276,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 }>(
|
||||||
"/v1/public/user/subscribe_log",
|
"/api/v1/public/user/subscribe_log",
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
params: {
|
||||||
@ -248,7 +293,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 }>(
|
||||||
"/v1/public/user/subscribe_note",
|
"/api/v1/public/user/subscribe_note",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -266,7 +311,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 }>(
|
||||||
"/v1/public/user/subscribe_token",
|
"/api/v1/public/user/subscribe_token",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -284,7 +329,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 }>(
|
||||||
"/v1/public/user/unbind_device",
|
"/api/v1/public/user/unbind_device",
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
@ -302,7 +347,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 }>(
|
||||||
"/v1/public/user/unbind_oauth",
|
"/api/v1/public/user/unbind_oauth",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -317,7 +362,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 }>(
|
||||||
"/v1/public/user/unbind_telegram",
|
"/api/v1/public/user/unbind_telegram",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
@ -330,14 +375,17 @@ export async function unsubscribe(
|
|||||||
body: API.UnsubscribeRequest,
|
body: API.UnsubscribeRequest,
|
||||||
options?: { [key: string]: any }
|
options?: { [key: string]: any }
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: any }>("/v1/public/user/unsubscribe", {
|
return request<API.Response & { data?: any }>(
|
||||||
method: "POST",
|
"/api/v1/public/user/unsubscribe",
|
||||||
headers: {
|
{
|
||||||
"Content-Type": "application/json",
|
method: "POST",
|
||||||
},
|
headers: {
|
||||||
data: body,
|
"Content-Type": "application/json",
|
||||||
...(options || {}),
|
},
|
||||||
});
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Pre Unsubscribe POST /v1/public/user/unsubscribe/pre */
|
/** Pre Unsubscribe POST /v1/public/user/unsubscribe/pre */
|
||||||
@ -346,7 +394,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 }>(
|
||||||
"/v1/public/user/unsubscribe/pre",
|
"/api/v1/public/user/unsubscribe/pre",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -364,7 +412,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 }>(
|
||||||
"/v1/public/user/verify_email",
|
"/api/v1/public/user/verify_email",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@ -375,3 +423,21 @@ export async function verifyEmail(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Query Withdrawal Log GET /v1/public/user/withdrawal_log */
|
||||||
|
export async function queryWithdrawalLog(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.QueryWithdrawalLogParams,
|
||||||
|
options?: { [key: string]: any }
|
||||||
|
) {
|
||||||
|
return request<API.Response & { data?: API.QueryWithdrawalLogListResponse }>(
|
||||||
|
"/api/v1/public/user/withdrawal_log",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user