| |
| |
| |
| |
| |
| |
| |
| export interface TokenStatusResponse { |
| configured: boolean; |
| token?: string | null; |
| } |
|
|
| export interface SetTokenBody { |
| token: string; |
| } |
|
|
| export interface HealthStatus { |
| status: string; |
| } |
|
|
| |
| |
| |
| export type GenerateImageBodyStyle = |
| (typeof GenerateImageBodyStyle)[keyof typeof GenerateImageBodyStyle]; |
|
|
| export const GenerateImageBodyStyle = { |
| none: "none", |
| realistic: "realistic", |
| anime: "anime", |
| artistic: "artistic", |
| cartoon: "cartoon", |
| sketch: "sketch", |
| oil_painting: "oil_painting", |
| watercolor: "watercolor", |
| digital_art: "digital_art", |
| } as const; |
|
|
| |
| |
| |
| export type GenerateImageBodyAspectRatio = |
| (typeof GenerateImageBodyAspectRatio)[keyof typeof GenerateImageBodyAspectRatio]; |
|
|
| export const GenerateImageBodyAspectRatio = { |
| "1:1": "1:1", |
| "16:9": "16:9", |
| "9:16": "9:16", |
| "4:3": "4:3", |
| "3:4": "3:4", |
| "2:3": "2:3", |
| "3:2": "3:2", |
| } as const; |
|
|
| |
| |
| |
| export type GenerateImageBodyModel = |
| (typeof GenerateImageBodyModel)[keyof typeof GenerateImageBodyModel]; |
|
|
| export const GenerateImageBodyModel = { |
| grok: "grok", |
| meta: "meta", |
| "imagen-pro": "imagen-pro", |
| "imagen-4": "imagen-4", |
| "imagen-flash": "imagen-flash", |
| "nano-banana-pro": "nano-banana-pro", |
| "nano-banana-2": "nano-banana-2", |
| } as const; |
|
|
| |
| |
| |
| export type GenerateImageBodyResolution = |
| (typeof GenerateImageBodyResolution)[keyof typeof GenerateImageBodyResolution]; |
|
|
| export const GenerateImageBodyResolution = { |
| "1K": "1K", |
| "2K": "2K", |
| "4K": "4K", |
| } as const; |
|
|
| export interface GenerateImageBody { |
| |
| prompt: string; |
| |
| style?: GenerateImageBodyStyle; |
| |
| aspectRatio?: GenerateImageBodyAspectRatio; |
| |
| model?: GenerateImageBodyModel; |
| |
| resolution?: GenerateImageBodyResolution; |
| |
| referenceImageBase64?: string; |
| |
| referenceImageMime?: string; |
| |
| isPrivate?: boolean; |
| } |
|
|
| export type ApiDebugInfoRequestHeaders = { [key: string]: string }; |
|
|
| export type ApiDebugInfoRequestBody = { [key: string]: unknown }; |
|
|
| export type ApiDebugInfoResponseBody = { [key: string]: unknown }; |
|
|
| export interface ApiDebugInfo { |
| requestUrl: string; |
| requestMethod: string; |
| requestHeaders: ApiDebugInfoRequestHeaders; |
| requestBody: ApiDebugInfoRequestBody; |
| responseStatus: number; |
| responseBody: ApiDebugInfoResponseBody; |
| durationMs: number; |
| usedFallback: boolean; |
| fallbackReason?: string; |
| } |
|
|
| export interface GenerateImageResponse { |
| id: number; |
| imageUrl: string; |
| prompt: string; |
| style: string; |
| aspectRatio: string; |
| model: string; |
| createdAt: string; |
| apiDebug: ApiDebugInfo; |
| } |
|
|
| export interface ImageRecord { |
| id: number; |
| imageUrl: string; |
| prompt: string; |
| style: string; |
| aspectRatio: string; |
| model: string; |
| isPrivate: boolean; |
| userId?: number | null; |
| createdAt: string; |
| } |
|
|
| export interface ImageHistoryResponse { |
| images: ImageRecord[]; |
| total: number; |
| } |
|
|
| export interface SuccessResponse { |
| success: boolean; |
| message?: string; |
| } |
|
|
| export interface ErrorResponse { |
| error: string; |
| message: string; |
| } |
|
|
| export type GetImageHistoryParams = { |
| limit?: number; |
| offset?: number; |
| }; |
|
|