mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 00:50:05 +00:00
[types] Add proper types for ImportFailInfo API endpoints (#4783)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user