aboutsummaryrefslogtreecommitdiffstats
path: root/packages/service-shared/src/schemas.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/service-shared/src/schemas.ts')
-rw-r--r--packages/service-shared/src/schemas.ts16
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
21import { z } from 'zod'; 21import { z } from 'zod';
22 22
23export const unreadCount = z.object({ 23export 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
28export 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*/
32export type UnreadCount = z.infer<typeof UnreadCount>;
29 33
30export const webSource = z.object({ 34export 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
35export 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*/
43export type WebSource = z.infer<typeof WebSource>;