mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-05 08:48:50 +03:00
hotfix: adapt new fal response (#7480)
This commit is contained in:
parent
4591b3391e
commit
5f16cb400d
@ -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>;
|
||||
|
Loading…
Reference in New Issue
Block a user