新需求更新 同步更新
This commit is contained in:
@@ -2164,6 +2164,7 @@ export interface SimilarAsinParseVo {
|
||||
groupCount?: number;
|
||||
aiPrompt?: string;
|
||||
imgSwitch?: boolean;
|
||||
categorySwitch?: boolean;
|
||||
items: SimilarAsinParsedRow[];
|
||||
groups?: SimilarAsinParsedGroup[];
|
||||
}
|
||||
@@ -2222,16 +2223,28 @@ export interface SimilarAsinTaskBatchVo {
|
||||
missingTaskIds?: number[];
|
||||
}
|
||||
|
||||
export function parseSimilarAsin(files: UploadedFileRef[], apiKey?: string, imgSwitch = false) {
|
||||
export function parseSimilarAsin(
|
||||
files: UploadedFileRef[],
|
||||
apiKey?: string,
|
||||
imgSwitch = false,
|
||||
categorySwitch = false,
|
||||
) {
|
||||
return unwrapJavaResponse(
|
||||
post<
|
||||
JavaApiResponse<SimilarAsinParseVo>,
|
||||
{ user_id: number; files: UploadedFileRef[]; api_key?: string; img_switch: boolean }
|
||||
{
|
||||
user_id: number;
|
||||
files: UploadedFileRef[];
|
||||
api_key?: string;
|
||||
img_switch: boolean;
|
||||
category_switch: boolean;
|
||||
}
|
||||
>(`${JAVA_API_PREFIX}/similar-asin/parse`, {
|
||||
user_id: getCurrentUserId(),
|
||||
files,
|
||||
api_key: apiKey,
|
||||
img_switch: imgSwitch,
|
||||
category_switch: categorySwitch,
|
||||
}),
|
||||
);
|
||||
}
|
||||
@@ -3078,6 +3091,16 @@ export interface CollectDataHistoryItem {
|
||||
invalidFilteredCount?: number;
|
||||
brandRejectedCount?: number;
|
||||
finalRowCount?: number;
|
||||
totalRows?: number;
|
||||
receivedRows?: number;
|
||||
processedRows?: number;
|
||||
collectStage?: string;
|
||||
currentKeyword?: string;
|
||||
searchCurrentPage?: number;
|
||||
searchTotalPages?: number;
|
||||
detailProcessedAsins?: number;
|
||||
detailTotalAsins?: number;
|
||||
progressPercent?: number;
|
||||
createdAt?: string;
|
||||
startedAt?: string;
|
||||
finishedAt?: string;
|
||||
@@ -3246,6 +3269,17 @@ export function putCollectDataCountryPreference(countryCodes: string[]) {
|
||||
);
|
||||
}
|
||||
|
||||
export function failCollectDataTask(taskId: number, error?: string) {
|
||||
const params = new URLSearchParams({ user_id: String(getCurrentUserId()) });
|
||||
if (error) params.set('error', error);
|
||||
return unwrapJavaResponse(
|
||||
post<JavaApiResponse<null>, undefined>(
|
||||
`${JAVA_API_PREFIX}/collect-data/tasks/${taskId}/fail?${params.toString()}`,
|
||||
undefined,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ========== 上架 ==========
|
||||
|
||||
export interface PublishSourceFile {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { getJavaDownloadUrl } from '@/shared/api/java-modules'
|
||||
|
||||
export type ModuleTemplateCode =
|
||||
| 'publish'
|
||||
| 'delete-brand'
|
||||
| 'appearance-patent'
|
||||
| 'price-track'
|
||||
| 'collect-data'
|
||||
| 'similar-asin'
|
||||
|
||||
export function getModuleTemplateDownloadUrl(moduleCode: ModuleTemplateCode) {
|
||||
return getJavaDownloadUrl(`/module-templates/${encodeURIComponent(moduleCode)}/download`)
|
||||
}
|
||||
Reference in New Issue
Block a user