1 import { z } from 'zod';
3 import { type APP_NAMES } from '@proton/shared/lib/constants';
5 import { RELEASE_CATEGORIES } from '../constants';
7 export const DesktopVersionSchema = z.object({
8 CategoryName: z.enum(Object.values(RELEASE_CATEGORIES) as [string, ...string[]]),
10 ReleaseDate: z.string(),
13 Identifier: z.string().optional(),
15 Sha512CheckSum: z.string(),
18 ReleaseNotes: z.array(
21 Notes: z.array(z.string()),
24 RolloutProportion: z.number(),
25 ManualUpdate: z.array(z.string()).optional(),
28 export const VersionFileSchema = z.object({
29 Releases: z.array(DesktopVersionSchema),
32 export type DesktopVersion = z.infer<typeof DesktopVersionSchema>;
33 export type VersionFile = z.infer<typeof VersionFileSchema>;
35 export type AppVersion = {