-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added route configurable
abortDelay
and isDehydrated
handle keys …
…and validation
- Loading branch information
1 parent
a4a8ca2
commit 739a701
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as z from "zod"; | ||
|
||
const HandleSchema = z | ||
.object({ | ||
abortDelay: z.number().int().min(250).max(180_000), // 3 minutes | ||
isDehydrated: z.boolean(), | ||
}) | ||
.partial(); | ||
|
||
export type Handle = z.infer<typeof HandleSchema>; | ||
|
||
export const MatchesSchema = z.array( | ||
z.object({ | ||
handle: HandleSchema.optional(), | ||
}), | ||
); | ||
|
||
export type Matches = z.infer<typeof MatchesSchema>; |