(payloadShape = z.undefined() as T)
| 13 | } |
| 14 | |
| 15 | export function standardResponseShape<T extends ZodTypeAny>(payloadShape = z.undefined() as T) { |
| 16 | return z.union([ |
| 17 | z.object({ |
| 18 | status: z.literal("success"), |
| 19 | payload: payloadShape, |
| 20 | }), |
| 21 | z.object({ |
| 22 | status: z.literal("error"), |
| 23 | message: z.string(), |
| 24 | }), |
| 25 | ]); |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected