feat: add fnOS packaging, storage workflows and release pipeline

This commit is contained in:
2026-08-11 18:05:49 +08:00
parent c5922f9b08
commit 95932f0199
181 changed files with 24024 additions and 1164 deletions
+206
View File
@@ -62,6 +62,154 @@ export const useApiStore = defineStore('coreapi', () => {
});
}
async function StorageConfig() {
return http.request<any, Response<any>>('/api/storage/config', 'get');
}
async function StorageInventory() {
return http.request<any, Response<any>>('/api/storage/inventory', 'get');
}
async function TestStorage(request: object) {
return http.request<any, Response<any>>('/api/storage/test', 'post_json', request);
}
async function OpenListDirectories(request: object) {
return http.request<any, Response<any>>('/api/storage/openlist/directories', 'post_json', request);
}
async function UpdateStorage(request: object) {
return http.request<any, Response<any>>('/api/storage/config', 'put_json', request);
}
async function EmailConfig() {
return http.request<any, Response<any>>('/api/email/config', 'get');
}
async function UpdateEmailConfig(request: object) {
return http.request<any, Response<any>>('/api/email/config', 'put_json', request);
}
async function TestEmailConfig(request: object) {
return http.request<any, Response<any>>('/api/email/test', 'post_json', request);
}
async function StorageMigrationPreflight() {
return http.request<any, Response<any>>('/api/storage/migrations/preflight', 'post_json', { verifyCapabilities: true });
}
async function CreateStorageMigration(request: object) {
return http.request<any, Response<any>>('/api/storage/migrations', 'post_json', request);
}
async function LatestStorageMigration() {
return http.request<any, Response<any>>('/api/storage/migrations/latest', 'get');
}
async function StorageMigrationDetail(id: string) {
return http.request<any, Response<any>>(`/api/storage/migrations/${id}`, 'get');
}
async function StorageMigrationItems(id: string, pageIndex: number, pageSize: number, stage?: number) {
const filter = stage === undefined ? '' : `&stage=${stage}`;
return http.request<any, Response<any>>(`/api/storage/migrations/${id}/items?pageIndex=${pageIndex}&pageSize=${pageSize}${filter}`, 'get');
}
async function StorageMigrationAction(id: string, action: string) {
return http.request<any, Response<any>>(`/api/storage/migrations/${id}/${action}`, 'post_json', {});
}
async function StorageMigrationFailedRecordsPreview() {
return http.request<any, Response<any>>('/api/storage/migrations/failed-records/preview', 'get');
}
async function RemoveStorageMigrationFailedRecords(confirmationToken: string) {
return http.request<any, Response<any>>('/api/storage/migrations/failed-records/remove', 'post_json', { confirmationToken });
}
async function ArchiveStorageMigrationHistory() {
return http.request<any, Response<any>>('/api/storage/migrations/history/archive', 'post_json', {});
}
async function OpenListDirectoryRepairPreflight(logicalPath = '/collect/Kk') {
return http.request<any, Response<any>>('/api/storage/openlist/directory-repairs/preflight', 'post_json', { logicalPath });
}
async function CreateOpenListDirectoryRepair(request: object) {
return http.request<any, Response<any>>('/api/storage/openlist/directory-repairs', 'post_json', request);
}
async function OpenListDirectoryRepairDetail(id: string) {
return http.request<any, Response<any>>(`/api/storage/openlist/directory-repairs/${id}`, 'get');
}
async function ConfirmOpenListDirectoryRepair(id: string, confirmationToken: string) {
return http.request<any, Response<any>>(`/api/storage/openlist/directory-repairs/${id}/confirm-cleanup`, 'post_json', { confirmationToken });
}
async function TaskSummary() {
return http.request<any, Response<any>>('/api/tasks/summary', 'get');
}
async function TaskList(params: Record<string, any> = {}) {
const query = new URLSearchParams();
Object.entries(params).forEach(([key, value]) => {
if (value !== undefined && value !== null && value !== '') query.set(key, String(value));
});
return http.request<any, Response<any>>(`/api/tasks?${query.toString()}`, 'get');
}
async function TaskDetail(type: number, id: string) {
return http.request<any, Response<any>>(`/api/tasks/${type}/${id}`, 'get');
}
async function TaskItems(type: number, id: string, params: Record<string, any> = {}) {
const query = new URLSearchParams();
Object.entries(params).forEach(([key, value]) => {
if (value !== undefined && value !== null && value !== '') query.set(key, String(value));
});
return http.request<any, Response<any>>(`/api/tasks/${type}/${id}/items?${query.toString()}`, 'get');
}
async function RetryTaskFailed(type: number, id: string) {
return http.request<any, Response<any>>(`/api/tasks/${type}/${id}/retry-failed`, 'post_json', {});
}
async function RetryTaskItem(type: number, taskId: string, itemId: string) {
return http.request<any, Response<any>>(`/api/tasks/${type}/${taskId}/items/${itemId}/retry`, 'post_json', {});
}
async function RetryTaskItemCleanup(type: number, taskId: string, itemId: string) {
return http.request<any, Response<any>>(`/api/tasks/${type}/${taskId}/items/${itemId}/retry-cleanup`, 'post_json', {});
}
async function TaskAction(type: number, id: string, action: string) {
return http.request<any, Response<any>>(`/api/tasks/${type}/${id}/actions/${action}`, 'post_json', {});
}
async function ProbeTaskStorage() {
return http.request<any, Response<any>>('/api/tasks/storage-health/probe', 'post_json', {});
}
async function StartTaskSync(videoType?: string | number) {
const query = videoType === undefined || videoType === null || videoType === ''
? ''
: `?videoType=${encodeURIComponent(String(videoType))}`;
return http.request<any, Response<any>>(`/api/tasks/sync${query}`, 'post_json', {});
}
async function VideoExclusions(params: Record<string, any> = {}) {
const query = new URLSearchParams();
Object.entries(params).forEach(([key, value]) => {
if (value !== undefined && value !== null && value !== '') query.set(key, String(value));
});
return http.request<any, Response<any>>(`/api/video/exclusions?${query.toString()}`, 'get');
}
async function UnexcludeVideos(ids: string[], createDownloadTask: boolean) {
return http.request<any, Response<any>>('/api/video/exclusions/unexclude', 'post_json', { ids, createDownloadTask });
}
//后台日志
async function apiGetLogs(param: string) {
return http.request<any, Response<any>>('/api/logs/GetLog/' + param, 'get').then(r => {
@@ -200,6 +348,18 @@ export const useApiStore = defineStore('coreapi', () => {
});
}
async function UpdateFollowLiveMonitor(param: object) {
return http.request<any, Response<any>>('/api/follow/live-monitor', 'post_json', param).then(r => r);
}
async function RefreshFollowLiveStatus(param: object) {
return http.request<any, Response<any>>('/api/follow/live-status/refresh', 'post_json', param).then(r => r);
}
async function QueryFollowLiveStatus(param: object) {
return http.request<any, Response<any>>('/api/follow/live-status/query', 'post_json', param).then(r => r);
}
async function UpdateFollowLiveEmail(param: object) {
return http.request<any, Response<any>>('/api/follow/live-email', 'post_json', param).then(r => r);
}
//重新下载
async function ReDownViedos(param: object) {
return http.request<any, Response<any>>('/api/video/redown', 'post_json', param).then(r => {
@@ -284,6 +444,14 @@ export const useApiStore = defineStore('coreapi', () => {
});
}
// 使用抖音资料页展示的抖音号查找博主,确认结果后再调用 AddFollow
async function ResolveFollowByDouyinNo(param: { cookieId: string; douyinNo: string }) {
return http.request<any, Response<any>>('/api/follow/resolve-by-douyin-no', 'post_json', param).then(r => {
return r;
}).finally(() => {
});
}
//删除非关注的博主
async function DelFollow(param: object) {
return http.request<any, Response<any>>('/api/follow/delete', 'post_json', param).then(r => {
@@ -387,6 +555,39 @@ export const useApiStore = defineStore('coreapi', () => {
// }
return {
StorageConfig,
StorageInventory,
TestStorage,
OpenListDirectories,
UpdateStorage,
EmailConfig,
UpdateEmailConfig,
TestEmailConfig,
StorageMigrationPreflight,
CreateStorageMigration,
LatestStorageMigration,
StorageMigrationDetail,
StorageMigrationItems,
StorageMigrationAction,
StorageMigrationFailedRecordsPreview,
RemoveStorageMigrationFailedRecords,
ArchiveStorageMigrationHistory,
OpenListDirectoryRepairPreflight,
CreateOpenListDirectoryRepair,
OpenListDirectoryRepairDetail,
ConfirmOpenListDirectoryRepair,
TaskSummary,
TaskList,
TaskDetail,
TaskItems,
RetryTaskFailed,
RetryTaskItem,
RetryTaskItemCleanup,
TaskAction,
ProbeTaskStorage,
StartTaskSync,
VideoExclusions,
UnexcludeVideos,
VideoChart,
BatchSaveCate,
CatePageList,
@@ -407,6 +608,7 @@ export const useApiStore = defineStore('coreapi', () => {
GetDeleteViedos,
DelFollow,
AddFollow,
ResolveFollowByDouyinNo,
CheckTag,
deleteCookie,
UpdateConfig,
@@ -424,6 +626,10 @@ export const useApiStore = defineStore('coreapi', () => {
SyncFollow,
OpenOrCloseSync,
OpenOrCloseFullSync,
UpdateFollowLiveMonitor,
RefreshFollowLiveStatus,
QueryFollowLiveStatus,
UpdateFollowLiveEmail,
ReDownViedos,
DeleteVideo
};