save insights explorer to database

This commit is contained in:
MaysWind
2026-01-07 01:04:54 +08:00
parent d4d1342c70
commit d462d0164c
36 changed files with 2091 additions and 286 deletions
+29
View File
@@ -117,6 +117,14 @@ import type {
TransactionTemplateDeleteRequest,
TransactionTemplateInfoResponse
} from '@/models/transaction_template.ts';
import type {
InsightsExplorerCreateRequest,
InsightsExplorerModifyRequest,
InsightsExplorerHideRequest,
InsightsExplorerMoveRequest,
InsightsExplorerDeleteRequest,
InsightsExplorerInfoResponse,
} from '@/models/explorer.ts';
import type {
TokenGenerateAPIRequest,
TokenGenerateMCPRequest,
@@ -742,6 +750,27 @@ export default {
deleteTransactionTemplate: (req: TransactionTemplateDeleteRequest): ApiResponsePromise<boolean> => {
return axios.post<ApiResponse<boolean>>('v1/transaction/templates/delete.json', req);
},
getAllInsightsExplorers: (): ApiResponsePromise<InsightsExplorerInfoResponse[]> => {
return axios.get<ApiResponse<InsightsExplorerInfoResponse[]>>('v1/insights/explorers/list.json');
},
getInsightsExplorer: ({ id }: { id: string }): ApiResponsePromise<InsightsExplorerInfoResponse> => {
return axios.get<ApiResponse<InsightsExplorerInfoResponse>>('v1/insights/explorers/get.json?id=' + id);
},
addInsightsExplorer: (req: InsightsExplorerCreateRequest): ApiResponsePromise<InsightsExplorerInfoResponse> => {
return axios.post<ApiResponse<InsightsExplorerInfoResponse>>('v1/insights/explorers/add.json', req);
},
modifyInsightsExplorer: (req: InsightsExplorerModifyRequest): ApiResponsePromise<InsightsExplorerInfoResponse> => {
return axios.post<ApiResponse<InsightsExplorerInfoResponse>>('v1/insights/explorers/modify.json', req);
},
hideInsightsExplorer: (req: InsightsExplorerHideRequest): ApiResponsePromise<boolean> => {
return axios.post<ApiResponse<boolean>>('v1/insights/explorers/hide.json', req);
},
moveInsightsExplorer: (req: InsightsExplorerMoveRequest): ApiResponsePromise<boolean> => {
return axios.post<ApiResponse<boolean>>('v1/insights/explorers/move.json', req);
},
deleteInsightsExplorer: (req: InsightsExplorerDeleteRequest): ApiResponsePromise<boolean> => {
return axios.post<ApiResponse<boolean>>('v1/insights/explorers/delete.json', req);
},
recognizeReceiptImage: ({ imageFile, cancelableUuid }: { imageFile: File, cancelableUuid?: string }): ApiResponsePromise<RecognizedReceiptImageResponse> => {
return axios.postForm<ApiResponse<RecognizedReceiptImageResponse>>('v1/llm/transactions/recognize_receipt_image.json', {
image: imageFile