From 7ff50796e5bec85c110d1c61b138d5db88dd7196 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 3 Apr 2023 18:56:59 +1000 Subject: [PATCH] chore(ui): regenerate api client --- .../web/src/services/api/models/ImageField.ts | 4 +-- .../src/services/api/schemas/$ImageField.ts | 2 ++ .../services/api/services/ImagesService.ts | 32 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/services/api/models/ImageField.ts b/invokeai/frontend/web/src/services/api/models/ImageField.ts index 10ef0092d4..fe1485f00d 100644 --- a/invokeai/frontend/web/src/services/api/models/ImageField.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageField.ts @@ -9,10 +9,10 @@ export type ImageField = { /** * The type of the image */ - image_type?: string; + image_type: string; /** * The name of the image */ - image_name?: string; + image_name: string; }; diff --git a/invokeai/frontend/web/src/services/api/schemas/$ImageField.ts b/invokeai/frontend/web/src/services/api/schemas/$ImageField.ts index a026ff05ef..aefb6c0807 100644 --- a/invokeai/frontend/web/src/services/api/schemas/$ImageField.ts +++ b/invokeai/frontend/web/src/services/api/schemas/$ImageField.ts @@ -7,10 +7,12 @@ export const $ImageField = { image_type: { type: 'string', description: `The type of the image`, + isRequired: true, }, image_name: { type: 'string', description: `The name of the image`, + isRequired: true, }, }, } as const; diff --git a/invokeai/frontend/web/src/services/api/services/ImagesService.ts b/invokeai/frontend/web/src/services/api/services/ImagesService.ts index e84e970ef0..d0108dbce6 100644 --- a/invokeai/frontend/web/src/services/api/services/ImagesService.ts +++ b/invokeai/frontend/web/src/services/api/services/ImagesService.ts @@ -42,6 +42,38 @@ export class ImagesService { }); } + /** + * Get Thumbnail + * Gets a thumbnail + * @returns any Successful Response + * @throws ApiError + */ + public static getThumbnail({ + imageType, + imageName, + }: { + /** + * The type of image to get + */ + imageType: ImageType, + /** + * The name of the image to get + */ + imageName: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/images/{image_type}/thumbnails/{image_name}', + path: { + 'image_type': imageType, + 'image_name': imageName, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + /** * Upload Image * @returns any Successful Response