feat(subscribe): Add unit time

This commit is contained in:
web@ppanel
2024-12-20 18:52:30 +07:00
parent d8b0bd9c2d
commit 39d07ecee5
80 changed files with 553 additions and 165 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as announcement from './announcement';
+12
View File
@@ -153,3 +153,15 @@ export async function getNodeList(
...(options || {}),
});
}
/** Node sort POST /v1/admin/server/sort */
export async function nodeSort(body: API.NodeSortRequest, options?: { [key: string]: any }) {
return request<API.Response & { data?: any }>('/v1/admin/server/sort', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
+15
View File
@@ -165,3 +165,18 @@ export async function getSubscribeList(
},
);
}
/** Subscribe sort POST /v1/admin/subscribe/sort */
export async function subscribeSort(
body: API.SubscribeSortRequest,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: any }>('/v1/admin/subscribe/sort', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
+22 -1
View File
@@ -12,6 +12,7 @@ declare namespace API {
title: string;
content: string;
enable: boolean;
type: number;
created_at: number;
updated_at: number;
};
@@ -81,6 +82,7 @@ declare namespace API {
type CreateAnnouncementRequest = {
title: string;
content: string;
type: number;
};
type CreateApplicationRequest = {
@@ -156,6 +158,7 @@ declare namespace API {
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@@ -504,6 +507,10 @@ declare namespace API {
node_push_interval: number;
};
type NodeSortRequest = {
sort: SortItem[];
};
type NodeStatus = {
online_users: OnlineUser[];
status: ServerStatus;
@@ -630,6 +637,7 @@ declare namespace API {
created_at: number;
updated_at: number;
status: NodeStatus;
sort: number;
};
type ServerGroup = {
@@ -682,6 +690,11 @@ declare namespace API {
site_logo: string;
};
type SortItem = {
id: number;
sort: number;
};
type StripeConfig = {
public_key: string;
secret_key: string;
@@ -694,6 +707,7 @@ declare namespace API {
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@@ -718,7 +732,7 @@ declare namespace API {
};
type SubscribeDiscount = {
months: number;
quantity: number;
discount: number;
};
@@ -730,6 +744,10 @@ declare namespace API {
updated_at: number;
};
type SubscribeSortRequest = {
sort: SortItem[];
};
type SubscribeType = {
subscribe_types: string[];
};
@@ -805,6 +823,7 @@ declare namespace API {
title: string;
content: string;
enable: boolean;
type: number;
};
type UpdateApplicationRequest = {
@@ -903,6 +922,7 @@ declare namespace API {
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@@ -915,6 +935,7 @@ declare namespace API {
server: number[];
show: boolean;
sell: boolean;
sort: number;
};
type UpdateTicketStatusRequest = {