hotfix: adapt new fal response (#7480)

This commit is contained in:
darkskygit 2024-07-12 03:22:03 +00:00
parent 4591b3391e
commit 5f16cb400d
No known key found for this signature in database
GPG Key ID: 97B7D036B1566E9D

View File

@ -28,10 +28,10 @@ export type FalConfig = {
const FalImageSchema = z
.object({
url: z.string(),
seed: z.number().optional(),
seed: z.number().nullable().optional(),
content_type: z.string(),
file_name: z.string().optional(),
file_size: z.number().optional(),
file_name: z.string().nullable().optional(),
file_size: z.number().nullable().optional(),
width: z.number(),
height: z.number(),
})
@ -46,9 +46,9 @@ const FalResponseSchema = z.object({
z.string(),
])
.optional(),
images: z.array(FalImageSchema).optional(),
image: FalImageSchema.optional(),
output: z.string().optional(),
images: z.array(FalImageSchema).nullable().optional(),
image: FalImageSchema.nullable().optional(),
output: z.string().nullable().optional(),
});
type FalResponse = z.infer<typeof FalResponseSchema>;