[types] Add proper types for ImportFailInfo API endpoints (#4783)

This commit is contained in:
Jin Yi
2025-08-07 07:36:14 +09:00
parent dbce8969ca
commit ee4605c6ca
2 changed files with 15 additions and 2 deletions

View File

@@ -3,6 +3,8 @@ import { ref } from 'vue'
import { api } from '@/scripts/api'
import {
type ImportFailInfoBulkRequest,
type ImportFailInfoBulkResponse,
type InstallPackParams,
type InstalledPacksResponse,
type ManagerPackInfo,
@@ -156,12 +158,12 @@ export const useComfyManagerService = () => {
}
const getImportFailInfoBulk = async (
params: { cnr_ids?: string[]; urls?: string[] } = {},
params: ImportFailInfoBulkRequest = {},
signal?: AbortSignal
) => {
const errorContext = 'Fetching bulk import failure information'
return executeRequest<Record<string, any>>(
return executeRequest<ImportFailInfoBulkResponse>(
() =>
managerApiClient.post(ManagerRoute.IMPORT_FAIL_INFO_BULK, params, {
signal

View File

@@ -3,6 +3,7 @@ import type { InjectionKey, Ref } from 'vue'
import type { ComfyWorkflowJSON } from '@/schemas/comfyWorkflowSchema'
import type { AlgoliaNodePack } from '@/types/algoliaTypes'
import type { components } from '@/types/comfyRegistryTypes'
import type { components as managerComponents } from '@/types/generatedManagerTypes'
import type { SearchMode } from '@/types/searchServiceTypes'
type WorkflowNodeProperties = ComfyWorkflowJSON['nodes'][0]['properties']
@@ -242,3 +243,13 @@ export interface ManagerState {
searchMode: SearchMode
sortField: string
}
/**
* Types for import failure information API
*/
export type ImportFailInfoBulkRequest =
managerComponents['schemas']['ImportFailInfoBulkRequest']
export type ImportFailInfoBulkResponse =
managerComponents['schemas']['ImportFailInfoBulkResponse']
export type ImportFailInfoItem =
managerComponents['schemas']['ImportFailInfoItem']