diff --git a/invokeai/frontend/web/src/services/api/index.ts b/invokeai/frontend/web/src/services/api/index.ts index 2dd1d616d8..000c22315b 100644 --- a/invokeai/frontend/web/src/services/api/index.ts +++ b/invokeai/frontend/web/src/services/api/index.ts @@ -20,7 +20,9 @@ export type { GraphInvocation } from './models/GraphInvocation'; export type { GraphInvocationOutput } from './models/GraphInvocationOutput'; export type { HTTPValidationError } from './models/HTTPValidationError'; export type { ImageField } from './models/ImageField'; +export type { ImageMetadata } from './models/ImageMetadata'; export type { ImageOutput } from './models/ImageOutput'; +export type { ImageResponse } from './models/ImageResponse'; export type { ImageToImageInvocation } from './models/ImageToImageInvocation'; export type { ImageType } from './models/ImageType'; export type { InpaintInvocation } from './models/InpaintInvocation'; @@ -32,7 +34,7 @@ export type { LoadImageInvocation } from './models/LoadImageInvocation'; export type { MaskFromAlphaInvocation } from './models/MaskFromAlphaInvocation'; export type { MaskOutput } from './models/MaskOutput'; export type { PaginatedResults_GraphExecutionState_ } from './models/PaginatedResults_GraphExecutionState_'; -export type { PaginatedResults_ImageField_ } from './models/PaginatedResults_ImageField_'; +export type { PaginatedResults_ImageResponse_ } from './models/PaginatedResults_ImageResponse_'; export type { PasteImageInvocation } from './models/PasteImageInvocation'; export type { PromptOutput } from './models/PromptOutput'; export type { RestoreFaceInvocation } from './models/RestoreFaceInvocation'; @@ -55,7 +57,9 @@ export { $GraphInvocation } from './schemas/$GraphInvocation'; export { $GraphInvocationOutput } from './schemas/$GraphInvocationOutput'; export { $HTTPValidationError } from './schemas/$HTTPValidationError'; export { $ImageField } from './schemas/$ImageField'; +export { $ImageMetadata } from './schemas/$ImageMetadata'; export { $ImageOutput } from './schemas/$ImageOutput'; +export { $ImageResponse } from './schemas/$ImageResponse'; export { $ImageToImageInvocation } from './schemas/$ImageToImageInvocation'; export { $ImageType } from './schemas/$ImageType'; export { $InpaintInvocation } from './schemas/$InpaintInvocation'; @@ -67,7 +71,7 @@ export { $LoadImageInvocation } from './schemas/$LoadImageInvocation'; export { $MaskFromAlphaInvocation } from './schemas/$MaskFromAlphaInvocation'; export { $MaskOutput } from './schemas/$MaskOutput'; export { $PaginatedResults_GraphExecutionState_ } from './schemas/$PaginatedResults_GraphExecutionState_'; -export { $PaginatedResults_ImageField_ } from './schemas/$PaginatedResults_ImageField_'; +export { $PaginatedResults_ImageResponse_ } from './schemas/$PaginatedResults_ImageResponse_'; export { $PasteImageInvocation } from './schemas/$PasteImageInvocation'; export { $PromptOutput } from './schemas/$PromptOutput'; export { $RestoreFaceInvocation } from './schemas/$RestoreFaceInvocation'; diff --git a/invokeai/frontend/web/src/services/api/models/ImageMetadata.ts b/invokeai/frontend/web/src/services/api/models/ImageMetadata.ts new file mode 100644 index 0000000000..daab51789f --- /dev/null +++ b/invokeai/frontend/web/src/services/api/models/ImageMetadata.ts @@ -0,0 +1,26 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +/** + * An image's metadata + */ +export type ImageMetadata = { + /** + * The creation timestamp of the image + */ + timestamp: number; + /** + * The width of the image in pixels + */ + width: number; + /** + * The width of the image in pixels + */ + height: number; + /** + * The image's SD-specific metadata + */ + sd_metadata?: any; +}; + diff --git a/invokeai/frontend/web/src/services/api/models/ImageResponse.ts b/invokeai/frontend/web/src/services/api/models/ImageResponse.ts new file mode 100644 index 0000000000..923a1b99d4 --- /dev/null +++ b/invokeai/frontend/web/src/services/api/models/ImageResponse.ts @@ -0,0 +1,33 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ImageMetadata } from './ImageMetadata'; +import type { ImageType } from './ImageType'; + +/** + * The response type for images + */ +export type ImageResponse = { + /** + * The type of the image + */ + image_type: ImageType; + /** + * The name of the image + */ + image_name: string; + /** + * The url of the image + */ + image_url: string; + /** + * The url of the image's thumbnail + */ + thumbnail_url: string; + /** + * The image's metadata + */ + metadata: ImageMetadata; +}; + diff --git a/invokeai/frontend/web/src/services/api/models/PaginatedResults_ImageField_.ts b/invokeai/frontend/web/src/services/api/models/PaginatedResults_ImageResponse_.ts similarity index 72% rename from invokeai/frontend/web/src/services/api/models/PaginatedResults_ImageField_.ts rename to invokeai/frontend/web/src/services/api/models/PaginatedResults_ImageResponse_.ts index 99f9dfe920..214c7c2f57 100644 --- a/invokeai/frontend/web/src/services/api/models/PaginatedResults_ImageField_.ts +++ b/invokeai/frontend/web/src/services/api/models/PaginatedResults_ImageResponse_.ts @@ -2,16 +2,16 @@ /* tslint:disable */ /* eslint-disable */ -import type { ImageField } from './ImageField'; +import type { ImageResponse } from './ImageResponse'; /** * Paginated results */ -export type PaginatedResults_ImageField_ = { +export type PaginatedResults_ImageResponse_ = { /** * Items */ - items: Array; + items: Array; /** * Current Page */ diff --git a/invokeai/frontend/web/src/services/api/schemas/$ImageMetadata.ts b/invokeai/frontend/web/src/services/api/schemas/$ImageMetadata.ts new file mode 100644 index 0000000000..bfcdee01bd --- /dev/null +++ b/invokeai/frontend/web/src/services/api/schemas/$ImageMetadata.ts @@ -0,0 +1,28 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ImageMetadata = { + description: `An image's metadata`, + properties: { + timestamp: { + type: 'number', + description: `The creation timestamp of the image`, + isRequired: true, + }, + width: { + type: 'number', + description: `The width of the image in pixels`, + isRequired: true, + }, + height: { + type: 'number', + description: `The width of the image in pixels`, + isRequired: true, + }, + sd_metadata: { + description: `The image's SD-specific metadata`, + properties: { + }, + }, + }, +} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$ImageResponse.ts b/invokeai/frontend/web/src/services/api/schemas/$ImageResponse.ts new file mode 100644 index 0000000000..ee1735c5c9 --- /dev/null +++ b/invokeai/frontend/web/src/services/api/schemas/$ImageResponse.ts @@ -0,0 +1,39 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ImageResponse = { + description: `The response type for images`, + properties: { + image_type: { + type: 'all-of', + description: `The type of the image`, + contains: [{ + type: 'ImageType', + }], + isRequired: true, + }, + image_name: { + type: 'string', + description: `The name of the image`, + isRequired: true, + }, + image_url: { + type: 'string', + description: `The url of the image`, + isRequired: true, + }, + thumbnail_url: { + type: 'string', + description: `The url of the image's thumbnail`, + isRequired: true, + }, + metadata: { + type: 'all-of', + description: `The image's metadata`, + contains: [{ + type: 'ImageMetadata', + }], + isRequired: true, + }, + }, +} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$PaginatedResults_ImageField_.ts b/invokeai/frontend/web/src/services/api/schemas/$PaginatedResults_ImageResponse_.ts similarity index 89% rename from invokeai/frontend/web/src/services/api/schemas/$PaginatedResults_ImageField_.ts rename to invokeai/frontend/web/src/services/api/schemas/$PaginatedResults_ImageResponse_.ts index 688e3745f2..113a374f85 100644 --- a/invokeai/frontend/web/src/services/api/schemas/$PaginatedResults_ImageField_.ts +++ b/invokeai/frontend/web/src/services/api/schemas/$PaginatedResults_ImageResponse_.ts @@ -1,13 +1,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export const $PaginatedResults_ImageField_ = { +export const $PaginatedResults_ImageResponse_ = { description: `Paginated results`, properties: { items: { type: 'array', contains: { - type: 'ImageField', + type: 'ImageResponse', }, isRequired: true, }, diff --git a/invokeai/frontend/web/src/services/api/services/ImagesService.ts b/invokeai/frontend/web/src/services/api/services/ImagesService.ts index 9a5b2cedea..e32bb97503 100644 --- a/invokeai/frontend/web/src/services/api/services/ImagesService.ts +++ b/invokeai/frontend/web/src/services/api/services/ImagesService.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import type { Body_upload_image } from '../models/Body_upload_image'; import type { ImageType } from '../models/ImageType'; -import type { PaginatedResults_ImageField_ } from '../models/PaginatedResults_ImageField_'; +import type { PaginatedResults_ImageResponse_ } from '../models/PaginatedResults_ImageResponse_'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; @@ -100,7 +100,7 @@ export class ImagesService { /** * List Images * Gets a list of images - * @returns PaginatedResults_ImageField_ Successful Response + * @returns PaginatedResults_ImageResponse_ Successful Response * @throws ApiError */ public static listImages({ @@ -120,7 +120,7 @@ export class ImagesService { * The number of images per page */ perPage?: number, - }): CancelablePromise { + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/images/',