fix
This commit is contained in:
@@ -8,9 +8,9 @@
|
|||||||
"build": "tsc -b && vite build",
|
"build": "tsc -b && vite build",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"generate-api": "node scripts/generate-api.js",
|
"api": "node scripts/generate-api.js",
|
||||||
"generate-api:dev": "OPENAPI_URL=http://localhost:3000/openapi.json node scripts/generate-api.js",
|
"api:dev": "OPENAPI_URL=http://localhost:3000/openapi.json node scripts/generate-api.js",
|
||||||
"generate-api:prod": "OPENAPI_URL=https://your-api-domain.com/openapi.json node scripts/generate-api.js"
|
"api:prod": "OPENAPI_URL=https://your-api-domain.com/openapi.json node scripts/generate-api.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^5.1.1",
|
"@hookform/resolvers": "^5.1.1",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import axios from 'axios';
|
|||||||
|
|
||||||
// 配置
|
// 配置
|
||||||
const config = {
|
const config = {
|
||||||
input: process.env.OPENAPI_URL || 'http://192.168.0.127:8010/openapi.json', // OpenAPI规范URL
|
input: process.env.OPENAPI_URL || 'https://bowongai--glam-api-fastapi-app.modal.run/openapi.json', // OpenAPI规范URL
|
||||||
output: './src/api', // 生成的API代码输出目录
|
output: './src/api', // 生成的API代码输出目录
|
||||||
client: 'axios', // 使用axios作为HTTP客户端
|
client: 'axios', // 使用axios作为HTTP客户端
|
||||||
useOptions: true,
|
useOptions: true,
|
||||||
|
|||||||
@@ -7,20 +7,15 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|||||||
export { OpenAPI } from './core/OpenAPI';
|
export { OpenAPI } from './core/OpenAPI';
|
||||||
export type { OpenAPIConfig } from './core/OpenAPI';
|
export type { OpenAPIConfig } from './core/OpenAPI';
|
||||||
|
|
||||||
export type { BatchImageEditData } from './models/BatchImageEditData';
|
|
||||||
export type { BatchVideoTaskRequest } from './models/BatchVideoTaskRequest';
|
export type { BatchVideoTaskRequest } from './models/BatchVideoTaskRequest';
|
||||||
export type { Body_async_custom_edit_image_api_async_custom_image_post } from './models/Body_async_custom_edit_image_api_async_custom_image_post';
|
|
||||||
export type { Body_create_model_api_models_create_post } from './models/Body_create_model_api_models_create_post';
|
export type { Body_create_model_api_models_create_post } from './models/Body_create_model_api_models_create_post';
|
||||||
export type { Body_handler_submit_task_api_comfy_async_submit_task_post } from './models/Body_handler_submit_task_api_comfy_async_submit_task_post';
|
|
||||||
export type { Body_local_async_batch_bg_opt_api_local_batch_change_bg_post } from './models/Body_local_async_batch_bg_opt_api_local_batch_change_bg_post';
|
|
||||||
export type { Body_local_async_change_bg_api_local_change_bg_post } from './models/Body_local_async_change_bg_api_local_change_bg_post';
|
|
||||||
export type { Body_local_async_change_bg_api_v2_local_batch_change_bg_post } from './models/Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
export type { Body_local_async_change_bg_api_v2_local_batch_change_bg_post } from './models/Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
||||||
export type { Body_local_async_gen_images_api_v2_local_batch_edit_images_post } from './models/Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
export type { Body_local_async_gen_images_api_v2_local_batch_edit_images_post } from './models/Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
||||||
export type { Body_local_async_gen_images_api_v2_local_batch_images_post } from './models/Body_local_async_gen_images_api_v2_local_batch_images_post';
|
export type { Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post } from './models/Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post';
|
||||||
|
export type { Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post } from './models/Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post';
|
||||||
export type { Body_update_model_api_models__model_id__put } from './models/Body_update_model_api_models__model_id__put';
|
export type { Body_update_model_api_models__model_id__put } from './models/Body_update_model_api_models__model_id__put';
|
||||||
export type { Body_upload_image_api_upload_post } from './models/Body_upload_image_api_upload_post';
|
export type { Body_upload_image_api_upload_post } from './models/Body_upload_image_api_upload_post';
|
||||||
export type { HTTPValidationError } from './models/HTTPValidationError';
|
export type { HTTPValidationError } from './models/HTTPValidationError';
|
||||||
export type { ImageEditItem } from './models/ImageEditItem';
|
|
||||||
export type { PaginationResponse } from './models/PaginationResponse';
|
export type { PaginationResponse } from './models/PaginationResponse';
|
||||||
export type { TaskQueryRequest } from './models/TaskQueryRequest';
|
export type { TaskQueryRequest } from './models/TaskQueryRequest';
|
||||||
export type { UploadResponse } from './models/UploadResponse';
|
export type { UploadResponse } from './models/UploadResponse';
|
||||||
@@ -30,20 +25,15 @@ export type { VideoDataResponse } from './models/VideoDataResponse';
|
|||||||
export type { VideoTaskRequest } from './models/VideoTaskRequest';
|
export type { VideoTaskRequest } from './models/VideoTaskRequest';
|
||||||
export type { VideoTaskStatus } from './models/VideoTaskStatus';
|
export type { VideoTaskStatus } from './models/VideoTaskStatus';
|
||||||
|
|
||||||
export { $BatchImageEditData } from './schemas/$BatchImageEditData';
|
|
||||||
export { $BatchVideoTaskRequest } from './schemas/$BatchVideoTaskRequest';
|
export { $BatchVideoTaskRequest } from './schemas/$BatchVideoTaskRequest';
|
||||||
export { $Body_async_custom_edit_image_api_async_custom_image_post } from './schemas/$Body_async_custom_edit_image_api_async_custom_image_post';
|
|
||||||
export { $Body_create_model_api_models_create_post } from './schemas/$Body_create_model_api_models_create_post';
|
export { $Body_create_model_api_models_create_post } from './schemas/$Body_create_model_api_models_create_post';
|
||||||
export { $Body_handler_submit_task_api_comfy_async_submit_task_post } from './schemas/$Body_handler_submit_task_api_comfy_async_submit_task_post';
|
|
||||||
export { $Body_local_async_batch_bg_opt_api_local_batch_change_bg_post } from './schemas/$Body_local_async_batch_bg_opt_api_local_batch_change_bg_post';
|
|
||||||
export { $Body_local_async_change_bg_api_local_change_bg_post } from './schemas/$Body_local_async_change_bg_api_local_change_bg_post';
|
|
||||||
export { $Body_local_async_change_bg_api_v2_local_batch_change_bg_post } from './schemas/$Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
export { $Body_local_async_change_bg_api_v2_local_batch_change_bg_post } from './schemas/$Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
||||||
export { $Body_local_async_gen_images_api_v2_local_batch_edit_images_post } from './schemas/$Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
export { $Body_local_async_gen_images_api_v2_local_batch_edit_images_post } from './schemas/$Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
||||||
export { $Body_local_async_gen_images_api_v2_local_batch_images_post } from './schemas/$Body_local_async_gen_images_api_v2_local_batch_images_post';
|
export { $Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post } from './schemas/$Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post';
|
||||||
|
export { $Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post } from './schemas/$Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post';
|
||||||
export { $Body_update_model_api_models__model_id__put } from './schemas/$Body_update_model_api_models__model_id__put';
|
export { $Body_update_model_api_models__model_id__put } from './schemas/$Body_update_model_api_models__model_id__put';
|
||||||
export { $Body_upload_image_api_upload_post } from './schemas/$Body_upload_image_api_upload_post';
|
export { $Body_upload_image_api_upload_post } from './schemas/$Body_upload_image_api_upload_post';
|
||||||
export { $HTTPValidationError } from './schemas/$HTTPValidationError';
|
export { $HTTPValidationError } from './schemas/$HTTPValidationError';
|
||||||
export { $ImageEditItem } from './schemas/$ImageEditItem';
|
|
||||||
export { $PaginationResponse } from './schemas/$PaginationResponse';
|
export { $PaginationResponse } from './schemas/$PaginationResponse';
|
||||||
export { $TaskQueryRequest } from './schemas/$TaskQueryRequest';
|
export { $TaskQueryRequest } from './schemas/$TaskQueryRequest';
|
||||||
export { $UploadResponse } from './schemas/$UploadResponse';
|
export { $UploadResponse } from './schemas/$UploadResponse';
|
||||||
@@ -54,6 +44,5 @@ export { $VideoTaskRequest } from './schemas/$VideoTaskRequest';
|
|||||||
export { $VideoTaskStatus } from './schemas/$VideoTaskStatus';
|
export { $VideoTaskStatus } from './schemas/$VideoTaskStatus';
|
||||||
|
|
||||||
export { Service } from './services/Service';
|
export { Service } from './services/Service';
|
||||||
export { ComfyService } from './services/ComfyService';
|
|
||||||
export { DefaultService } from './services/DefaultService';
|
export { DefaultService } from './services/DefaultService';
|
||||||
export { WebhookService } from './services/WebhookService';
|
export { WebhookService } from './services/WebhookService';
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { ImageEditItem } from './ImageEditItem';
|
|
||||||
export type BatchImageEditData = {
|
|
||||||
tasks: Array<ImageEditItem>;
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Body_async_custom_edit_image_api_async_custom_image_post = {
|
|
||||||
img_path: Blob;
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Body_handler_submit_task_api_comfy_async_submit_task_post = {
|
|
||||||
prompt: string;
|
|
||||||
edit_image: Blob;
|
|
||||||
aspect_ratio?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Body_local_async_batch_bg_opt_api_local_batch_change_bg_post = {
|
|
||||||
clothing_images: Array<Blob>;
|
|
||||||
scenario_categories?: Array<string>;
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Body_local_async_change_bg_api_local_change_bg_post = {
|
|
||||||
clothing_image: Blob;
|
|
||||||
scenario_categories?: Array<string>;
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Body_local_async_gen_images_api_v2_local_batch_images_post = {
|
|
||||||
clothing_images: Array<Blob>;
|
|
||||||
/**
|
|
||||||
* 标签,支持多个,多个之间使用逗号分割
|
|
||||||
*/
|
|
||||||
tag: string;
|
|
||||||
/**
|
|
||||||
* 风格标签
|
|
||||||
*/
|
|
||||||
style: string;
|
|
||||||
/**
|
|
||||||
* 场景标签,支持多个标签,标签之间使用逗号分割
|
|
||||||
*/
|
|
||||||
scenes: string;
|
|
||||||
/**
|
|
||||||
* 操作模式,支持 both, edit_only, bg_only
|
|
||||||
*/
|
|
||||||
mode?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post = {
|
||||||
|
clothing_images: Array<Blob>;
|
||||||
|
/**
|
||||||
|
* 场景标签集合JSON字符串
|
||||||
|
*/
|
||||||
|
scenes_list: string;
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post = {
|
||||||
|
clothing_images: Array<Blob>;
|
||||||
|
/**
|
||||||
|
* 标签列表JSON字符串,格式:["男_上衣_长款_牛仔_红", "xxxx"]
|
||||||
|
*/
|
||||||
|
tag_list: string;
|
||||||
|
/**
|
||||||
|
* 场景标签JSON字符串
|
||||||
|
*/
|
||||||
|
scenes_list: string;
|
||||||
|
/**
|
||||||
|
* 操作模式,支持 both, edit_only, bg_only
|
||||||
|
*/
|
||||||
|
mode?: string;
|
||||||
|
};
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type ImageEditItem = {
|
|
||||||
prompt: string;
|
|
||||||
edit_image: Blob;
|
|
||||||
aspect_ratio?: string;
|
|
||||||
task_id: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -4,13 +4,13 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export type VideoDataResponse = {
|
export type VideoDataResponse = {
|
||||||
id: number;
|
id: number;
|
||||||
task_id?: string;
|
task_id?: (string | null);
|
||||||
img_id?: string;
|
img_id?: (string | null);
|
||||||
img_url?: string;
|
img_url?: (string | null);
|
||||||
img_status?: string;
|
img_status?: (string | null);
|
||||||
video_id?: string;
|
video_id?: (string | null);
|
||||||
video_url?: string;
|
video_url?: (string | null);
|
||||||
video_status?: string;
|
video_status?: (string | null);
|
||||||
create_time?: string;
|
create_time?: (string | null);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
export * from './BatchImageEditData';
|
|
||||||
export * from './BatchVideoTaskRequest';
|
export * from './BatchVideoTaskRequest';
|
||||||
export * from './Body_async_custom_edit_image_api_async_custom_image_post';
|
|
||||||
export * from './Body_create_model_api_models_create_post';
|
export * from './Body_create_model_api_models_create_post';
|
||||||
export * from './Body_handler_submit_task_api_comfy_async_submit_task_post';
|
|
||||||
export * from './Body_local_async_batch_bg_opt_api_local_batch_change_bg_post';
|
|
||||||
export * from './Body_local_async_change_bg_api_local_change_bg_post';
|
|
||||||
export * from './Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
export * from './Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
||||||
export * from './Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
export * from './Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
||||||
export * from './Body_local_async_gen_images_api_v2_local_batch_images_post';
|
export * from './Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post';
|
||||||
|
export * from './Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post';
|
||||||
export * from './Body_update_model_api_models__model_id__put';
|
export * from './Body_update_model_api_models__model_id__put';
|
||||||
export * from './Body_upload_image_api_upload_post';
|
export * from './Body_upload_image_api_upload_post';
|
||||||
export * from './HTTPValidationError';
|
export * from './HTTPValidationError';
|
||||||
export * from './ImageEditItem';
|
|
||||||
export * from './PaginationResponse';
|
export * from './PaginationResponse';
|
||||||
export * from './TaskQueryRequest';
|
export * from './TaskQueryRequest';
|
||||||
export * from './UploadResponse';
|
export * from './UploadResponse';
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export const $BatchImageEditData = {
|
|
||||||
properties: {
|
|
||||||
tasks: {
|
|
||||||
type: 'array',
|
|
||||||
contains: {
|
|
||||||
type: 'ImageEditItem',
|
|
||||||
},
|
|
||||||
isRequired: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
} as const;
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export const $Body_async_custom_edit_image_api_async_custom_image_post = {
|
|
||||||
properties: {
|
|
||||||
img_path: {
|
|
||||||
type: 'binary',
|
|
||||||
isRequired: true,
|
|
||||||
format: 'binary',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
} as const;
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export const $Body_handler_submit_task_api_comfy_async_submit_task_post = {
|
|
||||||
properties: {
|
|
||||||
prompt: {
|
|
||||||
type: 'string',
|
|
||||||
isRequired: true,
|
|
||||||
},
|
|
||||||
edit_image: {
|
|
||||||
type: 'binary',
|
|
||||||
isRequired: true,
|
|
||||||
format: 'binary',
|
|
||||||
},
|
|
||||||
aspect_ratio: {
|
|
||||||
type: 'string',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
} as const;
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export const $Body_local_async_change_bg_api_local_change_bg_post = {
|
|
||||||
properties: {
|
|
||||||
clothing_image: {
|
|
||||||
type: 'binary',
|
|
||||||
isRequired: true,
|
|
||||||
format: 'binary',
|
|
||||||
},
|
|
||||||
scenario_categories: {
|
|
||||||
type: 'array',
|
|
||||||
contains: {
|
|
||||||
type: 'string',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
} as const;
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export const $Body_local_async_batch_bg_opt_api_local_batch_change_bg_post = {
|
export const $Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post = {
|
||||||
properties: {
|
properties: {
|
||||||
clothing_images: {
|
clothing_images: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
@@ -12,11 +12,10 @@ export const $Body_local_async_batch_bg_opt_api_local_batch_change_bg_post = {
|
|||||||
},
|
},
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
},
|
},
|
||||||
scenario_categories: {
|
scenes_list: {
|
||||||
type: 'array',
|
|
||||||
contains: {
|
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
description: `场景标签集合JSON字符串`,
|
||||||
|
isRequired: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export const $Body_local_async_gen_images_api_v2_local_batch_images_post = {
|
export const $Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post = {
|
||||||
properties: {
|
properties: {
|
||||||
clothing_images: {
|
clothing_images: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
@@ -12,19 +12,14 @@ export const $Body_local_async_gen_images_api_v2_local_batch_images_post = {
|
|||||||
},
|
},
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
},
|
},
|
||||||
tag: {
|
tag_list: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: `标签,支持多个,多个之间使用逗号分割`,
|
description: `标签列表JSON字符串,格式:["男_上衣_长款_牛仔_红", "xxxx"]`,
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
},
|
},
|
||||||
style: {
|
scenes_list: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: `风格标签`,
|
description: `场景标签JSON字符串`,
|
||||||
isRequired: true,
|
|
||||||
},
|
|
||||||
scenes: {
|
|
||||||
type: 'string',
|
|
||||||
description: `场景标签,支持多个标签,标签之间使用逗号分割`,
|
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
},
|
},
|
||||||
mode: {
|
mode: {
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export const $ImageEditItem = {
|
|
||||||
properties: {
|
|
||||||
prompt: {
|
|
||||||
type: 'string',
|
|
||||||
isRequired: true,
|
|
||||||
},
|
|
||||||
edit_image: {
|
|
||||||
type: 'binary',
|
|
||||||
isRequired: true,
|
|
||||||
format: 'binary',
|
|
||||||
},
|
|
||||||
aspect_ratio: {
|
|
||||||
type: 'string',
|
|
||||||
},
|
|
||||||
task_id: {
|
|
||||||
type: 'string',
|
|
||||||
isRequired: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
} as const;
|
|
||||||
@@ -9,29 +9,69 @@ export const $VideoDataResponse = {
|
|||||||
isRequired: true,
|
isRequired: true,
|
||||||
},
|
},
|
||||||
task_id: {
|
task_id: {
|
||||||
|
type: 'any-of',
|
||||||
|
contains: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
img_id: {
|
img_id: {
|
||||||
|
type: 'any-of',
|
||||||
|
contains: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
img_url: {
|
img_url: {
|
||||||
|
type: 'any-of',
|
||||||
|
contains: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
img_status: {
|
img_status: {
|
||||||
|
type: 'any-of',
|
||||||
|
contains: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
video_id: {
|
video_id: {
|
||||||
|
type: 'any-of',
|
||||||
|
contains: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
video_url: {
|
video_url: {
|
||||||
|
type: 'any-of',
|
||||||
|
contains: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
video_status: {
|
video_status: {
|
||||||
|
type: 'any-of',
|
||||||
|
contains: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
create_time: {
|
create_time: {
|
||||||
|
type: 'any-of',
|
||||||
|
contains: [{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'date-time',
|
format: 'date-time',
|
||||||
|
}, {
|
||||||
|
type: 'null',
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
@@ -1,121 +0,0 @@
|
|||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { BatchImageEditData } from '../models/BatchImageEditData';
|
|
||||||
import type { Body_handler_submit_task_api_comfy_async_submit_task_post } from '../models/Body_handler_submit_task_api_comfy_async_submit_task_post';
|
|
||||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
|
||||||
import { request as __request } from '../core/request';
|
|
||||||
export class ComfyService {
|
|
||||||
/**
|
|
||||||
* 提交单个编辑图片任务
|
|
||||||
* ComfyUI任务提交接口
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static handlerSubmitTaskApiComfyAsyncSubmitTaskPost({
|
|
||||||
formData,
|
|
||||||
}: {
|
|
||||||
formData: Body_handler_submit_task_api_comfy_async_submit_task_post,
|
|
||||||
}): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'POST',
|
|
||||||
url: '/api/comfy/async/submit/task',
|
|
||||||
formData: formData,
|
|
||||||
mediaType: 'multipart/form-data',
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Handler Query Task
|
|
||||||
* 查询单个任务状态接口
|
|
||||||
* :param task_id: 我们的任务ID
|
|
||||||
* :param db: 数据库会话
|
|
||||||
* :return: 任务状态信息
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static handlerQueryTaskApiComfyAsyncQueryTaskTaskIdGet({
|
|
||||||
taskId,
|
|
||||||
}: {
|
|
||||||
taskId: string,
|
|
||||||
}): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/comfy/async/query/task/{task_id}',
|
|
||||||
path: {
|
|
||||||
'task_id': taskId,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Handler Query All Tasks
|
|
||||||
* 查询所有任务列表接口
|
|
||||||
* :param skip: 跳过数量
|
|
||||||
* :param limit: 限制数量
|
|
||||||
* :param db: 数据库会话
|
|
||||||
* :return: 任务列表
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static handlerQueryAllTasksApiComfyAsyncQueryTaskGet({
|
|
||||||
skip,
|
|
||||||
limit = 10,
|
|
||||||
}: {
|
|
||||||
skip?: number,
|
|
||||||
limit?: number,
|
|
||||||
}): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/comfy/async/query/task',
|
|
||||||
query: {
|
|
||||||
'skip': skip,
|
|
||||||
'limit': limit,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Handler Query Pending Tasks
|
|
||||||
* 查询所有待处理的任务
|
|
||||||
* :param db: 数据库会话
|
|
||||||
* :return: 待处理任务列表
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static handlerQueryPendingTasksApiComfyAsyncQueryTasksPendingGet(): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/comfy/async/query/tasks/pending',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 批量提交编辑图片任务,最大同时支持两个任务
|
|
||||||
* 批量提交编辑图片任务,接收表单数据,tasks_json是任务列表JSON,files是文件列表
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static bacthSyncSubmitTaskApiComfyasyncBatchSubmitTaskPost({
|
|
||||||
requestBody,
|
|
||||||
}: {
|
|
||||||
requestBody: BatchImageEditData,
|
|
||||||
}): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'POST',
|
|
||||||
url: '/api/comfyasync/batch/submit/task',
|
|
||||||
body: requestBody,
|
|
||||||
mediaType: 'application/json',
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,12 +2,10 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import type { Body_async_custom_edit_image_api_async_custom_image_post } from '../models/Body_async_custom_edit_image_api_async_custom_image_post';
|
|
||||||
import type { Body_local_async_batch_bg_opt_api_local_batch_change_bg_post } from '../models/Body_local_async_batch_bg_opt_api_local_batch_change_bg_post';
|
|
||||||
import type { Body_local_async_change_bg_api_local_change_bg_post } from '../models/Body_local_async_change_bg_api_local_change_bg_post';
|
|
||||||
import type { Body_local_async_change_bg_api_v2_local_batch_change_bg_post } from '../models/Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
import type { Body_local_async_change_bg_api_v2_local_batch_change_bg_post } from '../models/Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
||||||
import type { Body_local_async_gen_images_api_v2_local_batch_edit_images_post } from '../models/Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
import type { Body_local_async_gen_images_api_v2_local_batch_edit_images_post } from '../models/Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
||||||
import type { Body_local_async_gen_images_api_v2_local_batch_images_post } from '../models/Body_local_async_gen_images_api_v2_local_batch_images_post';
|
import type { Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post } from '../models/Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post';
|
||||||
|
import type { Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post } from '../models/Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post';
|
||||||
import type { Body_upload_image_api_upload_post } from '../models/Body_upload_image_api_upload_post';
|
import type { Body_upload_image_api_upload_post } from '../models/Body_upload_image_api_upload_post';
|
||||||
import type { PaginationResponse } from '../models/PaginationResponse';
|
import type { PaginationResponse } from '../models/PaginationResponse';
|
||||||
import type { TaskQueryRequest } from '../models/TaskQueryRequest';
|
import type { TaskQueryRequest } from '../models/TaskQueryRequest';
|
||||||
@@ -37,104 +35,6 @@ export class DefaultService {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* 本地换背景
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static localAsyncChangeBgApiLocalChangeBgPost({
|
|
||||||
formData,
|
|
||||||
}: {
|
|
||||||
formData: Body_local_async_change_bg_api_local_change_bg_post,
|
|
||||||
}): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'POST',
|
|
||||||
url: '/api/local/change/bg',
|
|
||||||
formData: formData,
|
|
||||||
mediaType: 'multipart/form-data',
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* 本地批量换背景图片
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static localAsyncBatchBgOptApiLocalBatchChangeBgPost({
|
|
||||||
formData,
|
|
||||||
}: {
|
|
||||||
formData: Body_local_async_batch_bg_opt_api_local_batch_change_bg_post,
|
|
||||||
}): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'POST',
|
|
||||||
url: '/api/local/batch/change/bg',
|
|
||||||
formData: formData,
|
|
||||||
mediaType: 'multipart/form-data',
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* 异步自定义图片生成 - 立即返回task_id
|
|
||||||
* 异步版本:立即返回task_id,避免阻塞worker
|
|
||||||
* 客户端需要用task_id轮询 /api/check_task 查询结果
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static asyncCustomEditImageApiAsyncCustomImagePost({
|
|
||||||
formData,
|
|
||||||
}: {
|
|
||||||
formData: Body_async_custom_edit_image_api_async_custom_image_post,
|
|
||||||
}): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'POST',
|
|
||||||
url: '/api/async/custom/image',
|
|
||||||
formData: formData,
|
|
||||||
mediaType: 'multipart/form-data',
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* 本地新版异步图片生成接口
|
|
||||||
* 本地新版异步图片生成接口
|
|
||||||
*
|
|
||||||
* Args:
|
|
||||||
* clothing_images: 服装图片文件列表
|
|
||||||
* tag: 模特标签(用于筛选模特)
|
|
||||||
* style: 风格标签(如:少女、马来)
|
|
||||||
* scenes: 场景标签(如:室内,室外)
|
|
||||||
* mode: 操作模式(both/edit_only/bg_only)
|
|
||||||
* db: 数据库会话
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* dict: 异步任务提交结果
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public static localAsyncGenImagesApiV2LocalBatchImagesPost({
|
|
||||||
formData,
|
|
||||||
}: {
|
|
||||||
formData: Body_local_async_gen_images_api_v2_local_batch_images_post,
|
|
||||||
}): CancelablePromise<any> {
|
|
||||||
return __request(OpenAPI, {
|
|
||||||
method: 'POST',
|
|
||||||
url: '/api/v2/local/batch/images',
|
|
||||||
formData: formData,
|
|
||||||
mediaType: 'multipart/form-data',
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 本地新版异步图片生成接口
|
* 本地新版异步图片生成接口
|
||||||
* 本地新版异步图片生成接口
|
* 本地新版异步图片生成接口
|
||||||
@@ -271,4 +171,76 @@ export class DefaultService {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 本地V2云端智能负载均衡异步图片生成接口
|
||||||
|
* 本地V2云端智能负载均衡异步图片生成接口
|
||||||
|
*
|
||||||
|
* 🚀 新功能:
|
||||||
|
* - 智能负载均衡:自动选择最优ComfyUI节点
|
||||||
|
* - 实时节点健康检测:避免任务分配到故障节点
|
||||||
|
* - 性能优化:响应时间优化分配算法
|
||||||
|
* - 内部统计监控:记录执行统计信息到日志
|
||||||
|
*
|
||||||
|
* Args:
|
||||||
|
* clothing_images: 服装图片文件列表
|
||||||
|
* tag_list: 标签列表JSON字符串,格式:["男_上衣_长款_牛仔_红", "xxxx"] 注意tag_list 与 clothing_images 长度一致
|
||||||
|
* scenes_list: 场景标签JSON字符串,格式:[{"title": "客厅1","prompt": "室内场景..."}]
|
||||||
|
* mode: 操作模式(both/edit_only/bg_only)
|
||||||
|
* db: 数据库会话
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* dict: 异步任务提交结果(格式与V2版本完全一致)
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static localCloudAsyncGenImagesApiV2CloudBatchEditImagesPost({
|
||||||
|
formData,
|
||||||
|
}: {
|
||||||
|
formData: Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post,
|
||||||
|
}): CancelablePromise<any> {
|
||||||
|
return __request(OpenAPI, {
|
||||||
|
method: 'POST',
|
||||||
|
url: '/api/v2/cloud/batch/edit/images',
|
||||||
|
formData: formData,
|
||||||
|
mediaType: 'multipart/form-data',
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 本地V2云端智能负载均衡异步换背景接口
|
||||||
|
* 本地V2云端智能负载均衡异步换背景接口
|
||||||
|
*
|
||||||
|
* 🚀 新功能:
|
||||||
|
* - 智能负载均衡:自动选择最优ComfyUI节点
|
||||||
|
* - 实时节点健康检测:避免任务分配到故障节点
|
||||||
|
* - 性能优化:响应时间优化分配算法
|
||||||
|
* - 内部统计监控:记录执行统计信息到日志
|
||||||
|
*
|
||||||
|
* Args:
|
||||||
|
* clothing_images: 服装图片文件列表
|
||||||
|
* scenes_list: 场景标签集合JSON字符串
|
||||||
|
* db: 数据库会话
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* dict: 异步任务提交结果(格式与V2版本完全一致)
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static localCloudAsyncChangeBgApiV2CloudBatchChangeBgPost({
|
||||||
|
formData,
|
||||||
|
}: {
|
||||||
|
formData: Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post,
|
||||||
|
}): CancelablePromise<any> {
|
||||||
|
return __request(OpenAPI, {
|
||||||
|
method: 'POST',
|
||||||
|
url: '/api/v2/cloud/batch/change/bg',
|
||||||
|
formData: formData,
|
||||||
|
mediaType: 'multipart/form-data',
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,30 @@ export class Service {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取Modal配置信息
|
||||||
|
* 获取当前Modal服务配置信息
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static getModalConfigApiJmModalConfigGet(): CancelablePromise<any> {
|
||||||
|
return __request(OpenAPI, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/jm/modal/config',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 刷新Modal配置
|
||||||
|
* 刷新Modal配置,重新自动发现端点URL
|
||||||
|
* @returns any Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static refreshModalConfigApiJmModalConfigRefreshPost(): CancelablePromise<any> {
|
||||||
|
return __request(OpenAPI, {
|
||||||
|
method: 'POST',
|
||||||
|
url: '/api/jm/modal/config/refresh',
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 创建模型
|
* 创建模型
|
||||||
* 创建模型
|
* 创建模型
|
||||||
@@ -129,7 +153,7 @@ export class Service {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取模型列表
|
* 获取模特列表
|
||||||
* 获取模型列表
|
* 获取模型列表
|
||||||
*
|
*
|
||||||
* Args:
|
* Args:
|
||||||
@@ -312,7 +336,7 @@ export class Service {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取风格标签结构(外层风格 + 内层场景)
|
* 获取换背景标签
|
||||||
* @returns any Successful Response
|
* @returns any Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
@@ -334,7 +358,7 @@ export class Service {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取JM模型的提示词
|
* 获取jm生成视频的提示词
|
||||||
* @returns any Successful Response
|
* @returns any Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { OpenAPI } from '../core/OpenAPI';
|
|||||||
import { request as __request } from '../core/request';
|
import { request as __request } from '../core/request';
|
||||||
export class WebhookService {
|
export class WebhookService {
|
||||||
/**
|
/**
|
||||||
|
* @deprecated
|
||||||
* 异步数据处理
|
* 异步数据处理
|
||||||
* @returns any Successful Response
|
* @returns any Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
export * from './ComfyService';
|
|
||||||
export * from './DefaultService';
|
export * from './DefaultService';
|
||||||
export * from './WebhookService';
|
export * from './WebhookService';
|
||||||
Reference in New Issue
Block a user