( itemSchema: T, cursorSchema = z.string() )
| 96 | ); |
| 97 | |
| 98 | export function buildCursorResponseSchema<T extends z.ZodType>( |
| 99 | itemSchema: T, |
| 100 | cursorSchema = z.string() |
| 101 | ) { |
| 102 | return z.object({ |
| 103 | items: z.array(itemSchema), |
| 104 | nextCursor: cursorSchema.optional(), |
| 105 | }); |
| 106 | } |
no outgoing calls
no test coverage detected