mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): remove SerializableObject, use type-fest's JsonObject
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import type { StartQueryActionCreatorOptions } from '@reduxjs/toolkit/dist/query/core/buildInitiate';
|
||||
import { getStore } from 'app/store/nanostores/store';
|
||||
import type { SerializableObject } from 'common/types';
|
||||
import type { BoardId } from 'features/gallery/store/types';
|
||||
import { ASSETS_CATEGORIES, IMAGE_CATEGORIES } from 'features/gallery/store/types';
|
||||
import type { components, paths } from 'services/api/schema';
|
||||
@@ -76,7 +75,7 @@ export const imagesApi = api.injectEndpoints({
|
||||
query: (image_name) => ({ url: buildImagesUrl(`i/${image_name}`) }),
|
||||
providesTags: (result, error, image_name) => [{ type: 'Image', id: image_name }],
|
||||
}),
|
||||
getImageMetadata: build.query<SerializableObject | undefined, string>({
|
||||
getImageMetadata: build.query<JsonObject | undefined, string>({
|
||||
query: (image_name) => ({ url: buildImagesUrl(`i/${image_name}/metadata`) }),
|
||||
providesTags: (result, error, image_name) => [{ type: 'ImageMetadata', id: image_name }],
|
||||
}),
|
||||
@@ -270,7 +269,7 @@ export const imagesApi = api.injectEndpoints({
|
||||
session_id?: string;
|
||||
board_id?: string;
|
||||
crop_visible?: boolean;
|
||||
metadata?: SerializableObject;
|
||||
metadata?: JsonObject;
|
||||
isFirstUploadOfBatch?: boolean;
|
||||
}
|
||||
>({
|
||||
@@ -613,7 +612,7 @@ export const getImageDTO = (image_name: string, options?: StartQueryActionCreato
|
||||
export const getImageMetadata = (
|
||||
image_name: string,
|
||||
options?: StartQueryActionCreatorOptions
|
||||
): Promise<SerializableObject | undefined> => {
|
||||
): Promise<JsonObject | undefined> => {
|
||||
const _options = {
|
||||
subscribe: false,
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user