后端架构更新
This commit is contained in:
@@ -309,6 +309,10 @@ export interface DeleteBrandResultItem {
|
||||
openStoreUrl?: string;
|
||||
outputFilename?: string;
|
||||
downloadUrl?: string;
|
||||
fileJobId?: number;
|
||||
fileStatus?: string;
|
||||
fileError?: string;
|
||||
fileReady?: boolean;
|
||||
taskId?: number;
|
||||
countryCount?: number;
|
||||
countries?: DeleteBrandCountryGroup[];
|
||||
@@ -396,6 +400,10 @@ export function deleteDedupeHistory(resultId: number) {
|
||||
);
|
||||
}
|
||||
|
||||
export function getDedupeResultDownloadUrl(resultId: number) {
|
||||
return getJavaDownloadUrl(`/dedupe/results/${resultId}/download`);
|
||||
}
|
||||
|
||||
export function runSplit(
|
||||
request: Omit<SplitRunRequest, "user_id"> | SplitRunRequest,
|
||||
) {
|
||||
@@ -426,6 +434,10 @@ export function deleteSplitHistory(resultId: number) {
|
||||
);
|
||||
}
|
||||
|
||||
export function getSplitResultDownloadUrl(resultId: number) {
|
||||
return getJavaDownloadUrl(`/split/results/${resultId}/download`);
|
||||
}
|
||||
|
||||
export function getConvertTemplates() {
|
||||
return unwrapJavaResponse(
|
||||
get<JavaApiResponse<ConvertTemplateVo[]>>(
|
||||
@@ -495,6 +507,10 @@ export function deleteConvertHistory(resultId: number) {
|
||||
);
|
||||
}
|
||||
|
||||
export function getConvertResultDownloadUrl(resultId: number) {
|
||||
return getJavaDownloadUrl(`/convert/results/${resultId}/download`);
|
||||
}
|
||||
|
||||
export function runDeleteBrand(
|
||||
request: Omit<DeleteBrandRunRequest, "user_id"> | DeleteBrandRunRequest,
|
||||
) {
|
||||
@@ -683,6 +699,10 @@ export interface ProductRiskHistoryItem {
|
||||
error?: string;
|
||||
outputFilename?: string;
|
||||
downloadUrl?: string;
|
||||
fileJobId?: number;
|
||||
fileStatus?: string;
|
||||
fileError?: string;
|
||||
fileReady?: boolean;
|
||||
scheduledAt?: string;
|
||||
}
|
||||
|
||||
@@ -1025,6 +1045,10 @@ export interface PatrolDeleteHistoryItem {
|
||||
finishedAt?: string;
|
||||
outputFilename?: string;
|
||||
downloadUrl?: string;
|
||||
fileJobId?: number;
|
||||
fileStatus?: string;
|
||||
fileError?: string;
|
||||
fileReady?: boolean;
|
||||
countrySections: PatrolDeleteCountrySection[];
|
||||
cartRatios: PatrolDeleteCartRatio[];
|
||||
}
|
||||
@@ -1237,6 +1261,10 @@ export interface QueryAsinHistoryItem {
|
||||
finishedAt?: string;
|
||||
outputFilename?: string;
|
||||
downloadUrl?: string;
|
||||
fileJobId?: number;
|
||||
fileStatus?: string;
|
||||
fileError?: string;
|
||||
fileReady?: boolean;
|
||||
queryAsins: QueryAsinCountryAsins[];
|
||||
countryResults?: QueryAsinCountryResult[];
|
||||
}
|
||||
@@ -1358,6 +1386,144 @@ export function deleteQueryAsinHistory(resultId: number) {
|
||||
);
|
||||
}
|
||||
|
||||
// ========== 外观专利检测 ==========
|
||||
|
||||
export interface AppearancePatentParsedRow {
|
||||
rowIndex: number;
|
||||
sourceId: string;
|
||||
displayId: string;
|
||||
asin: string;
|
||||
country: string;
|
||||
url?: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface AppearancePatentParseVo {
|
||||
taskId: number;
|
||||
sourceFilename?: string;
|
||||
totalRows: number;
|
||||
acceptedRows: number;
|
||||
droppedRows: number;
|
||||
aiPrompt?: string;
|
||||
items: AppearancePatentParsedRow[];
|
||||
}
|
||||
|
||||
export interface AppearancePatentDashboardVo {
|
||||
pendingTaskCount: number;
|
||||
processedTaskCount: number;
|
||||
successTaskCount: number;
|
||||
failedTaskCount: number;
|
||||
}
|
||||
|
||||
export interface AppearancePatentHistoryItem {
|
||||
resultId?: number;
|
||||
taskId?: number;
|
||||
sourceFilename?: string;
|
||||
resultFilename?: string;
|
||||
downloadUrl?: string;
|
||||
fileJobId?: number;
|
||||
fileStatus?: string;
|
||||
fileError?: string;
|
||||
fileReady?: boolean;
|
||||
taskStatus?: string;
|
||||
success?: boolean;
|
||||
error?: string;
|
||||
rowCount?: number;
|
||||
createdAt?: string;
|
||||
}
|
||||
|
||||
export interface AppearancePatentHistoryVo {
|
||||
items: AppearancePatentHistoryItem[];
|
||||
}
|
||||
|
||||
export interface AppearancePatentTaskSummary {
|
||||
id?: number;
|
||||
taskNo?: string;
|
||||
status?: string;
|
||||
errorMessage?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
finishedAt?: string;
|
||||
}
|
||||
|
||||
export interface AppearancePatentTaskDetailVo {
|
||||
task?: AppearancePatentTaskSummary;
|
||||
items?: AppearancePatentHistoryItem[];
|
||||
}
|
||||
|
||||
export interface AppearancePatentTaskBatchVo {
|
||||
items: AppearancePatentTaskDetailVo[];
|
||||
missingTaskIds?: number[];
|
||||
}
|
||||
|
||||
export function parseAppearancePatent(files: UploadedFileRef[], aiPrompt: string) {
|
||||
return unwrapJavaResponse(
|
||||
post<
|
||||
JavaApiResponse<AppearancePatentParseVo>,
|
||||
{ user_id: number; files: UploadedFileRef[]; ai_prompt: string }
|
||||
>(`${JAVA_API_PREFIX}/appearance-patent/parse`, {
|
||||
user_id: getCurrentUserId(),
|
||||
files,
|
||||
ai_prompt: aiPrompt,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
export function getAppearancePatentDashboard() {
|
||||
return unwrapJavaResponse(
|
||||
get<JavaApiResponse<AppearancePatentDashboardVo>>(
|
||||
`${JAVA_API_PREFIX}/appearance-patent/dashboard`,
|
||||
{ params: { user_id: getCurrentUserId() } },
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getAppearancePatentHistory() {
|
||||
return unwrapJavaResponse(
|
||||
get<JavaApiResponse<AppearancePatentHistoryVo>>(
|
||||
`${JAVA_API_PREFIX}/appearance-patent/history`,
|
||||
{ params: { user_id: getCurrentUserId() } },
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getAppearancePatentTaskProgressBatch(taskIds: number[]) {
|
||||
return postTaskProgressBatch<AppearancePatentTaskBatchVo>(
|
||||
`${JAVA_API_PREFIX}/appearance-patent/tasks/progress/batch`,
|
||||
taskIds,
|
||||
);
|
||||
}
|
||||
|
||||
export function activateAppearancePatentTask(taskId: number) {
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<null>, undefined>(
|
||||
`${JAVA_API_PREFIX}/appearance-patent/tasks/${taskId}/activate?user_id=${encodeURIComponent(String(getCurrentUserId()))}`,
|
||||
undefined,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function deleteAppearancePatentTask(taskId: number) {
|
||||
return unwrapJavaResponse(
|
||||
del<JavaApiResponse<null>>(`${JAVA_API_PREFIX}/appearance-patent/tasks/${taskId}`, {
|
||||
params: { user_id: getCurrentUserId() },
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
export function deleteAppearancePatentHistory(resultId: number) {
|
||||
return unwrapJavaResponse(
|
||||
del<JavaApiResponse<null>>(
|
||||
`${JAVA_API_PREFIX}/appearance-patent/history/${resultId}`,
|
||||
{ params: { user_id: getCurrentUserId() } },
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function getAppearancePatentResultDownloadUrl(resultId: number) {
|
||||
return getJavaDownloadUrl(`/appearance-patent/results/${resultId}/download`);
|
||||
}
|
||||
|
||||
// ========== 跟价 ==========
|
||||
|
||||
export interface PriceTrackCandidateVo {
|
||||
@@ -1413,6 +1579,10 @@ export interface PriceTrackHistoryItem {
|
||||
taskStatus?: string;
|
||||
outputFilename?: string;
|
||||
downloadUrl?: string;
|
||||
fileJobId?: number;
|
||||
fileStatus?: string;
|
||||
fileError?: string;
|
||||
fileReady?: boolean;
|
||||
error?: string;
|
||||
success?: boolean;
|
||||
}
|
||||
@@ -1426,6 +1596,7 @@ export interface PriceTrackAsinParsedRow {
|
||||
asin?: string;
|
||||
price?: string;
|
||||
recommendedPrice?: string;
|
||||
shippingFee?: string;
|
||||
minimumPrice?: string;
|
||||
firstPlace?: string;
|
||||
secondPlace?: string;
|
||||
|
||||
Reference in New Issue
Block a user