mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
hotfix: adapt new fal response (#7480)
This commit is contained in:
@@ -28,10 +28,10 @@ export type FalConfig = {
|
|||||||
const FalImageSchema = z
|
const FalImageSchema = z
|
||||||
.object({
|
.object({
|
||||||
url: z.string(),
|
url: z.string(),
|
||||||
seed: z.number().optional(),
|
seed: z.number().nullable().optional(),
|
||||||
content_type: z.string(),
|
content_type: z.string(),
|
||||||
file_name: z.string().optional(),
|
file_name: z.string().nullable().optional(),
|
||||||
file_size: z.number().optional(),
|
file_size: z.number().nullable().optional(),
|
||||||
width: z.number(),
|
width: z.number(),
|
||||||
height: z.number(),
|
height: z.number(),
|
||||||
})
|
})
|
||||||
@@ -46,9 +46,9 @@ const FalResponseSchema = z.object({
|
|||||||
z.string(),
|
z.string(),
|
||||||
])
|
])
|
||||||
.optional(),
|
.optional(),
|
||||||
images: z.array(FalImageSchema).optional(),
|
images: z.array(FalImageSchema).nullable().optional(),
|
||||||
image: FalImageSchema.optional(),
|
image: FalImageSchema.nullable().optional(),
|
||||||
output: z.string().optional(),
|
output: z.string().nullable().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type FalResponse = z.infer<typeof FalResponseSchema>;
|
type FalResponse = z.infer<typeof FalResponseSchema>;
|
||||||
|
|||||||
Reference in New Issue
Block a user