提交昨晚更新改动

This commit is contained in:
super
2026-07-14 12:50:17 +08:00
parent d8ca8de537
commit 8a9126e626
21 changed files with 1104 additions and 173 deletions
+45 -14
View File
@@ -2123,7 +2123,9 @@ export interface PriceTrackAsinParsedRow {
shippingFee?: string;
minimumPrice?: string;
firstPlace?: string;
firstShop?: string;
secondPlace?: string;
secondShop?: string;
cartShopName?: string;
priceChangeStatus?: string;
modifyCount?: string;
@@ -2417,6 +2419,10 @@ export function getTaskSkipPriceAsinsPaginated(
taskId: number,
page: number = 1,
pageSize: number = 1000,
options: {
shopName?: string | string[];
countryCode?: string | string[];
} = {},
) {
return unwrapJavaResponse(
get<JavaApiResponse<SkipPriceAsinPageVo>>(
@@ -2425,6 +2431,8 @@ export function getTaskSkipPriceAsinsPaginated(
params: {
page,
page_size: pageSize,
...(options.shopName ? { shop_name: options.shopName } : {}),
...(options.countryCode ? { country_code: options.countryCode } : {}),
},
},
),
@@ -2503,10 +2511,12 @@ export interface ImageVideoSecretStatusVo {
expired?: boolean;
hasCopyApiKey?: boolean;
hasT8Key?: boolean;
hasT8VideoKey?: boolean;
hasVoiceApiKey?: boolean;
hasVoiceGroupId?: boolean;
copyApiKeyMasked?: string;
t8KeyMasked?: string;
t8VideoKeyMasked?: string;
voiceApiKeyMasked?: string;
voiceGroupIdMasked?: string;
expireDays?: number;
@@ -2516,6 +2526,7 @@ export interface ImageVideoSecretStatusVo {
export interface ImageVideoSecretSavePayload {
copyApiKey?: string;
t8Key?: string;
t8VideoKey?: string;
voiceApiKey?: string;
voiceGroupId?: string;
expireDays: number;
@@ -2524,6 +2535,7 @@ export interface ImageVideoSecretSavePayload {
export interface ImageVideoWorkflowParameters {
api_key_info: {
t8star_key: string;
t8_video_key: string;
ai_conductor_key: string;
};
bg_info: {
@@ -2551,6 +2563,9 @@ export interface ImageVideoWorkflowParameters {
audio_info: {
audio_url: string;
type: number;
bgm_url: string;
mode: number;
voice_name: string;
};
video_info: {
video_url: string;
@@ -2575,6 +2590,20 @@ export interface ImageVideoWorkflowResponse {
[key: string]: unknown;
}
export type ImageVideoAsyncTaskStatus = 'PENDING' | 'RUNNING' | 'WAITING' | 'POLLING' | 'SUCCESS' | 'FAILED'
export interface ImageVideoAsyncTaskVo {
taskId: number;
taskType: string;
status: ImageVideoAsyncTaskStatus;
cozeExecuteId?: string;
cozeStatus?: string;
result?: unknown;
errorMessage?: string;
submittedAt?: string;
completedAt?: string;
}
export interface ImageVideoMediaUploadVo {
url: string;
objectKey: string;
@@ -2621,30 +2650,36 @@ export function saveImageVideoSecrets(payload: ImageVideoSecretSavePayload) {
export function runImageVideoDouyinCopy(payload: ImageVideoDouyinCopyPayload) {
return unwrapJavaResponse(
post<JavaApiResponse<ImageVideoDouyinCopyVo>, ImageVideoDouyinCopyPayload & { userId: number }>(
post<JavaApiResponse<ImageVideoAsyncTaskVo>, ImageVideoDouyinCopyPayload & { userId: number }>(
`${JAVA_API_PREFIX}/image-video/douyin-copy`,
{ userId: getCurrentUserId(), ...payload },
{ timeout: 180000 },
),
);
}
export function runImageVideoWorkflow(parameters: ImageVideoWorkflowParameters) {
return unwrapJavaResponse(
post<JavaApiResponse<ImageVideoWorkflowResponse>, ImageVideoWorkflowRunRequest>(
post<JavaApiResponse<ImageVideoAsyncTaskVo>, ImageVideoWorkflowRunRequest>(
`${JAVA_API_PREFIX}/image-video/workflow/run`,
{ userId: getCurrentUserId(), parameters },
{ timeout: 3600000 },
),
);
}
export function getImageVideoWorkflowResult(executeId: string) {
return unwrapJavaResponse(
post<JavaApiResponse<ImageVideoWorkflowResponse>, ImageVideoWorkflowResultRequest>(
post<JavaApiResponse<ImageVideoAsyncTaskVo>, ImageVideoWorkflowResultRequest>(
`${JAVA_API_PREFIX}/image-video/workflow/result`,
{ userId: getCurrentUserId(), executeId },
{ timeout: 3600000 },
),
);
}
export function getImageVideoAsyncTask(taskId: number) {
return unwrapJavaResponse(
get<JavaApiResponse<ImageVideoAsyncTaskVo>>(
`${JAVA_API_PREFIX}/image-video/tasks/${taskId}`,
{ params: { user_id: getCurrentUserId() } },
),
);
}
@@ -2680,40 +2715,36 @@ function resolveImageVideoMediaType(file: File) {
export function listImageVideoVoices(name = "") {
return unwrapJavaResponse(
post<JavaApiResponse<ImageVideoVoiceWorkflowResponse>, { userId: number; name: string }>(
post<JavaApiResponse<ImageVideoAsyncTaskVo>, { userId: number; name: string }>(
`${JAVA_API_PREFIX}/image-video/voice/list`,
{ userId: getCurrentUserId(), name },
{ timeout: 180000 },
),
);
}
export function deleteImageVideoVoice(voiceId: string) {
return unwrapJavaResponse(
post<JavaApiResponse<ImageVideoVoiceWorkflowResponse>, { userId: number; voiceId: string }>(
post<JavaApiResponse<ImageVideoAsyncTaskVo>, { userId: number; voiceId: string }>(
`${JAVA_API_PREFIX}/image-video/voice/delete`,
{ userId: getCurrentUserId(), voiceId },
{ timeout: 180000 },
),
);
}
export function cloneImageVideoVoice(payload: { name?: string; audioUrl?: string; videoUrl?: string }) {
return unwrapJavaResponse(
post<JavaApiResponse<ImageVideoVoiceWorkflowResponse>, { userId: number; name?: string; audioUrl?: string; videoUrl?: string }>(
post<JavaApiResponse<ImageVideoAsyncTaskVo>, { userId: number; name?: string; audioUrl?: string; videoUrl?: string }>(
`${JAVA_API_PREFIX}/image-video/voice/clone`,
{ userId: getCurrentUserId(), ...payload },
{ timeout: 180000 },
),
);
}
export function synthesizeImageVideoVoice(payload: { text: string; voiceId: string }) {
return unwrapJavaResponse(
post<JavaApiResponse<ImageVideoVoiceWorkflowResponse>, { userId: number; text: string; voiceId: string }>(
post<JavaApiResponse<ImageVideoAsyncTaskVo>, { userId: number; text: string; voiceId: string }>(
`${JAVA_API_PREFIX}/image-video/voice/synthesis`,
{ userId: getCurrentUserId(), ...payload },
{ timeout: 180000 },
),
);
}