Skip to content

Commit

Permalink
lint(gui): split up response types
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 22, 2023
1 parent 8435b18 commit 2edb3c6
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions gui/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export interface BrushParams {
}

/**
* Additional parameters for upscaling.
* Additional parameters for upscaling. May be sent with most other requests to run a post-pipeline.
*/
export interface UpscaleParams {
enabled: boolean;
Expand All @@ -136,24 +136,37 @@ export interface UpscaleReqParams {
source: Blob;
}

/**
* Parameters for blend requests.
*/
export interface BlendParams {
sources: Array<Blob>;
mask: Blob;
}

/**
* Output image data within the response.
*/
export interface ImageOutput {
key: string;
url: string;
}

/**
* Output image size, after upscaling and outscale.
*/
export interface ImageSize {
width: number;
height: number;
}

/**
* General response for most image requests.
*/
export interface ImageResponse {
outputs: Array<{
key: string;
url: string;
}>;
outputs: Array<ImageOutput>;
params: Required<BaseImgParams> & Required<ModelParams>;
size: {
width: number;
height: number;
};
size: ImageSize;
}

/**
Expand Down

0 comments on commit 2edb3c6

Please sign in to comment.