|
export type ProjectionMode = 'cartesian' | 'spherical' |
|
|
|
export type CacheMode = "use" | "renew" | "ignore" |
|
|
|
export interface RenderRequest { |
|
prompt: string |
|
|
|
|
|
|
|
|
|
|
|
segmentation: 'disabled' | 'firstframe' | 'allframes' |
|
|
|
|
|
|
|
actionnables: string[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
nbFrames: number |
|
|
|
nbSteps: number |
|
|
|
seed: number |
|
|
|
width: number |
|
height: number |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
upscalingFactor: number |
|
|
|
projection: ProjectionMode |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
turbo: boolean |
|
|
|
cache: CacheMode |
|
|
|
wait: boolean |
|
|
|
analyze: boolean |
|
} |
|
|
|
export interface ImageSegment { |
|
id: number |
|
box: number[] |
|
color: number[] |
|
label: string |
|
score: number |
|
} |
|
|
|
export type RenderedSceneStatus = |
|
| "pending" |
|
| "completed" |
|
| "error" |
|
|
|
export interface RenderedScene { |
|
renderId: string |
|
status: RenderedSceneStatus |
|
assetUrl: string |
|
alt: string |
|
error: string |
|
maskUrl: string |
|
segments: ImageSegment[] |
|
} |
|
|
|
export interface ImageAnalysisRequest { |
|
image: string |
|
prompt: string |
|
} |
|
|
|
export interface ImageAnalysisResponse { |
|
result: string |
|
error?: string |
|
} |
|
|
|
export type GeneratedPanel = { |
|
panel: number |
|
instructions: string |
|
caption: string |
|
} |
|
|
|
export type GeneratedPanels = GeneratedPanel[] |
|
|
|
export type LLMEngine = |
|
| "INFERENCE_API" |
|
| "INFERENCE_ENDPOINT" |
|
| "OPENAI" |
|
| "REPLICATE" |
|
| "GROQ" |
|
|
|
export type RenderingEngine = |
|
| "VIDEOCHAIN" |
|
| "OPENAI" |
|
| "REPLICATE" |
|
| "INFERENCE_API" |
|
| "INFERENCE_ENDPOINT" |
|
|
|
export type RenderingModelVendor = |
|
| "SERVER" |
|
| "OPENAI" |
|
| "REPLICATE" |
|
| "HUGGINGFACE" |
|
|
|
export type PostVisibility = |
|
| "featured" |
|
| "trending" |
|
| "normal" |
|
|
|
export type Post = { |
|
postId: string |
|
appId: string |
|
prompt: string |
|
previewUrl: string |
|
assetUrl: string |
|
createdAt: string |
|
visibility: PostVisibility |
|
upvotes: number |
|
downvotes: number |
|
} |
|
|
|
export type CreatePostResponse = { |
|
success?: boolean |
|
error?: string |
|
post: Post |
|
} |
|
|
|
export type GetAppPostsResponse = { |
|
success?: boolean |
|
error?: string |
|
posts: Post[] |
|
} |
|
|
|
export type GetAppPostResponse = { |
|
success?: boolean |
|
error?: string |
|
post: Post |
|
} |
|
|
|
export type LayoutProps = { |
|
page: number |
|
nbPanels: number |
|
} |
|
|
|
|
|
export type Settings = { |
|
renderingModelVendor: RenderingModelVendor |
|
renderingUseTurbo: boolean |
|
huggingFaceOAuth: string |
|
huggingfaceApiKey: string |
|
huggingfaceInferenceApiModel: string |
|
huggingfaceInferenceApiModelTrigger: string |
|
huggingfaceInferenceApiFileType: string |
|
replicateApiKey: string |
|
replicateApiModel: string |
|
replicateApiModelVersion: string |
|
replicateApiModelTrigger: string |
|
openaiApiKey: string |
|
openaiApiModel: string |
|
openaiApiLanguageModel: string |
|
groqApiKey: string |
|
groqApiLanguageModel: string |
|
hasGeneratedAtLeastOnce: boolean |
|
} |
|
|
|
export type DynamicConfig = { |
|
maxNbPages: number |
|
nbPanelsPerPage: number |
|
nbTotalPanelsToGenerate: number |
|
oauthClientId: string |
|
oauthRedirectUrl: string |
|
oauthScopes: string |
|
enableHuggingFaceOAuth: boolean |
|
enableHuggingFaceOAuthWall: boolean |
|
} |
|
|