diff --git a/src/schemas/apiSchema.ts b/src/schemas/apiSchema.ts index 64b0b5208..37833cf2f 100644 --- a/src/schemas/apiSchema.ts +++ b/src/schemas/apiSchema.ts @@ -13,6 +13,9 @@ export type PromptId = z.infer export const resultItemType = z.enum(['input', 'output', 'temp']) export type ResultItemType = z.infer +const zCustomNodesI18n = z.record(z.string(), z.unknown()) +export type CustomNodesI18n = z.infer + const zResultItem = z.object({ filename: z.string().optional(), subfolder: z.string().optional(), diff --git a/src/scripts/api.ts b/src/scripts/api.ts index 9e096888c..41310b0bd 100644 --- a/src/scripts/api.ts +++ b/src/scripts/api.ts @@ -22,6 +22,7 @@ import type { } from '@/platform/workflow/validation/schemas/workflowSchema' import type { AssetDownloadWsMessage, + CustomNodesI18n, EmbeddingsResponse, ExecutedWsMessage, ExecutingWsMessage, @@ -1074,7 +1075,7 @@ export class ComfyApi extends EventTarget { */ async storeUserData( file: string, - data: BodyInit | Record | null, + data: unknown, options: RequestInit & { overwrite?: boolean stringify?: boolean @@ -1251,7 +1252,7 @@ export class ComfyApi extends EventTarget { * * @returns The custom nodes i18n data */ - async getCustomNodesI18n(): Promise> { + async getCustomNodesI18n(): Promise { return (await axios.get(this.apiURL('/i18n'))).data }