update create link helper

This commit is contained in:
Nate Kelley 2025-10-06 13:47:30 -06:00
parent aed85a32b2
commit 108d0a5a17
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 16 additions and 13 deletions

View File

@ -3,7 +3,10 @@ import { z } from 'zod';
const CreateHrefFromLinkParamsSchema = z.object({
to: z.string().describe('Route path with param placeholders like /path/$paramName'),
params: z.record(z.string()).describe('Object mapping param names to values'),
search: z.record(z.union([z.string(), z.number(), z.boolean(), z.undefined()])).optional().describe('Query parameters'),
search: z
.record(z.union([z.string(), z.number(), z.boolean(), z.undefined()]))
.optional()
.describe('Query parameters'),
});
type CreateHrefFromLinkParams = z.infer<typeof CreateHrefFromLinkParamsSchema>;