1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { z } from "zod";
export const CiderConfig = z.object({
host: z.string().default("http://localhost:10767"),
appToken: z.string().default(""),
});
export type CiderConfig = z.infer<typeof CiderConfig>;
export const CiderTrack = z.object({
name: z.string(),
artist: z.string(),
album: z.string(),
artworkUrl: z.string().nullable(),
durationMs: z.number(),
currentMs: z.number(),
});
export const CiderPayload = z.object({
playing: z.boolean(),
track: CiderTrack.nullable(),
});
export type CiderPayload = z.infer<typeof CiderPayload>;
|