fix: handle empty stays in query
This commit is contained in:
@@ -78,14 +78,16 @@ export const getStaysSchema = z.object({
|
||||
}),
|
||||
})
|
||||
),
|
||||
links: z.object({
|
||||
self: z.string(),
|
||||
offset: z.number(),
|
||||
limit: z.number(),
|
||||
totalCount: z.number(),
|
||||
}),
|
||||
links: z
|
||||
.object({
|
||||
self: z.string(),
|
||||
offset: z.number(),
|
||||
limit: z.number(),
|
||||
totalCount: z.number(),
|
||||
})
|
||||
.nullable(),
|
||||
})
|
||||
|
||||
type GetStaysData = z.infer<typeof getStaysSchema>
|
||||
export type GetStaysData = z.infer<typeof getStaysSchema>
|
||||
|
||||
export type Stay = GetStaysData["data"][number]
|
||||
export type Stay = GetStaysData["data"][0]
|
||||
|
||||
Reference in New Issue
Block a user