diff options
Diffstat (limited to 'packages/service-shared/src/schemas.ts')
-rw-r--r-- | packages/service-shared/src/schemas.ts | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/service-shared/src/schemas.ts b/packages/service-shared/src/schemas.ts index 586750c..0b31eb7 100644 --- a/packages/service-shared/src/schemas.ts +++ b/packages/service-shared/src/schemas.ts | |||
@@ -20,16 +20,24 @@ | |||
20 | 20 | ||
21 | import { z } from 'zod'; | 21 | import { z } from 'zod'; |
22 | 22 | ||
23 | export const unreadCount = z.object({ | 23 | export const UnreadCount = z.object({ |
24 | direct: z.number().nonnegative().optional(), | 24 | direct: z.number().nonnegative().optional(), |
25 | indirect: z.number().nonnegative().optional(), | 25 | indirect: z.number().nonnegative().optional(), |
26 | }); | 26 | }); |
27 | 27 | ||
28 | export type UnreadCount = z.infer<typeof unreadCount>; | 28 | /* |
29 | eslint-disable-next-line @typescript-eslint/no-redeclare -- | ||
30 | Intentionally naming the type the same as the schema definition. | ||
31 | */ | ||
32 | export type UnreadCount = z.infer<typeof UnreadCount>; | ||
29 | 33 | ||
30 | export const webSource = z.object({ | 34 | export const WebSource = z.object({ |
31 | code: z.string(), | 35 | code: z.string(), |
32 | url: z.string().nonempty(), | 36 | url: z.string().nonempty(), |
33 | }); | 37 | }); |
34 | 38 | ||
35 | export type WebSource = z.infer<typeof webSource>; | 39 | /* |
40 | eslint-disable-next-line @typescript-eslint/no-redeclare -- | ||
41 | Intentionally naming the type the same as the schema definition. | ||
42 | */ | ||
43 | export type WebSource = z.infer<typeof WebSource>; | ||