Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / shared / lib / desktop / DesktopVersion.ts
blobddccbfb085032f78a3bf340257743e73a9975d7f
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[]]),
9     Version: z.string(),
10     ReleaseDate: z.string(),
11     File: z.array(
12         z.object({
13             Identifier: z.string().optional(),
14             Url: z.string(),
15             Sha512CheckSum: z.string(),
16         })
17     ),
18     ReleaseNotes: z.array(
19         z.object({
20             Type: z.string(),
21             Notes: z.array(z.string()),
22         })
23     ),
24     RolloutProportion: z.number(),
25     ManualUpdate: z.array(z.string()).optional(),
26 });
28 export const VersionFileSchema = z.object({
29     Releases: z.array(DesktopVersionSchema),
30 });
32 export type DesktopVersion = z.infer<typeof DesktopVersionSchema>;
33 export type VersionFile = z.infer<typeof VersionFileSchema>;
35 export type AppVersion = {
36     name: APP_NAMES;
37     version: string;